Hi Richard,

On Wed, Jul 27, 2016 at 11:39:02AM +0100, Richard Russon wrote:
> In the new mx_check_mailbox(), there's the following:
> 
>   ops = mx_get_ops (ctx->magic);
>   if (!ops)
>     return -1;
> 
>   return ops->check (ctx, index_hint);
> 
> Shouldn't we use ctx->mx_ops?
> Or at least check for their existence, first?

I don't really recall, but maybe mx_check_mailbox might be called in a
way where ctx->mx_ops is not set? Look at the TODO in mx.c:1239:

  /* TODO: Convert this to use dest->mx_ops after *
   * mx_open_mailbox_append() is changed to set mx_ops.
   */

So, if mx_check_mailbox can be called after mx_open_mailbox_append,
ctx->mx_ops can be invalid/not set.

I hope I will get some time in coming weeks to continue the cleanup.


Thanks,
Damien

Reply via email to