Re: [PATCH 3/3] suppress notification

Yao Qi
2012-08-28T07:58:48Z

On 08/28/2012 05:00 AM, Vladimir Prus wrote:
>> + /* If non-null, the pointer to a flag indicates that this function
>> is being
>> + called. */
>> + int *called;
>
> But in practice, this is pointer that points to notification that must
> be supressed when this
> command is running. So, at least the comment is misleading. And if some
> other code will
> want to check whether the current command is A, it would have to look at
> notification
> flags.
>

Although field 'called' is added for notification suppressing, but I
don't couple this field to notification suppressing. Ideally, field
'called' is set to 1 when the command/function is called, as comment
says, and set back to 0 when it is done. At this point, it has nothing
to do with notification suppressing, and we use this field to do
something else in a free way.

When we want to suppress notification, we make use of the feature of
field 'called'. I am not sure it is misleading.

If you still think it is misleading, I'd like to rename variable
'mi_suppress_notification' to 'mi_cmd_called'. WDYT?

--
Yao