Re: [PATCH 3/3] suppress notification

Vladimir Prus
2012-08-27T21:01:29Z

On 27.08.2012 13:45, Yao Qi wrote:
> Hi,
> This patch is to change the existing 'suppress mechanism' to avoid
> adding endless command name comparisons to suppress corresponding MI
> notification. This patch adds a new field 'called' in 'struct
> mi_cmd', so that each MI command has a 'suppressed' flag associated to
> it, and we don't have to compare command name anymore.

Hi Yao,

I am not 100% sure this is ideal approach. Your comment say:

> + /* 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.

So, at the very least, this field should have a different name, I think.

Thanks,
Volodya