box = mailbox_alloc(info->ns->list, info->vname, MAILBOX_FLAG_READONLY);
mailbox_set_reason(box, "NOTIFY send STATUS");
- if (ctx->client->enabled_features != 0)
- (void)mailbox_enable(box, ctx->client->enabled_features);
+ (void)mailbox_enable(box, ctx->client->enabled_features);
if (imap_status_get(cmd, info->ns, info->vname, &items, &result) < 0) {
if (result.error == MAIL_ERROR_PERM)
return -1;
}
- if (client->enabled_features != 0)
- ret = mailbox_enable(ctx->box, client->enabled_features);
+ ret = mailbox_enable(ctx->box, client->enabled_features);
if (ret < 0 ||
mailbox_sync(ctx->box, MAILBOX_SYNC_FLAG_FULL_READ) < 0) {
client_send_box_error(ctx->cmd, ctx->box);
mailbox_free(&box);
return -1;
}
- if (cmd->client->enabled_features != 0) {
- if (mailbox_enable(box, cmd->client->enabled_features) < 0) {
- client_send_box_error(cmd, box);
- mailbox_free(&box);
- return -1;
- }
+ if (mailbox_enable(box, cmd->client->enabled_features) < 0) {
+ client_send_box_error(cmd, box);
+ mailbox_free(&box);
+ return -1;
}
*destbox_r = box;
return 0;
return -1;
}
- if (client->enabled_features != 0)
- ret = mailbox_enable(box, client->enabled_features);
+ ret = mailbox_enable(box, client->enabled_features);
if (ret < 0 || mailbox_sync(box, 0) < 0) {
*error_r = t_strdup_printf("Couldn't sync mailbox: %s",
mailbox_get_last_internal_error(box, NULL));
/* open the mailbox */
box = mailbox_alloc(ns->list, mailbox, MAILBOX_FLAG_READONLY);
mailbox_set_reason(box, "STATUS");
- if (client->enabled_features != 0)
- (void)mailbox_enable(box, client->enabled_features);
+ (void)mailbox_enable(box, client->enabled_features);
}
if ((items->status & STATUS_HIGHESTMODSEQ) != 0)