Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imap NOTIFY: Flush any pending notifications on NOOP
This is mainly to allow testing NOTIFY easily with imaptest scripts. This is cheap anyway, because mailbox_list_notify_flush() doesn't do any syscalls when there's no work.
- Loading branch information
1 parent
3ee1976
commit 6c4273f
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
/* Copyright (c) 2002-2017 Dovecot authors, see the included COPYING file */ | ||
|
||
#include "imap-common.h" | ||
#include "imap-notify.h" | ||
#include "imap-commands.h" | ||
|
||
bool cmd_noop(struct client_command_context *cmd) | ||
{ | ||
if (cmd->client->notify_ctx != NULL) { | ||
/* flush any delayed notifications now. this is mainly useful | ||
for testing. */ | ||
imap_notify_flush(cmd->client->notify_ctx); | ||
} | ||
return cmd_sync(cmd, 0, IMAP_SYNC_FLAG_SAFE, "OK NOOP completed."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters