Skip to content

Commit

Permalink
imap: Move struct client_sync_context to imap-sync-private.h and add …
Browse files Browse the repository at this point in the history
…imap_ prefix
  • Loading branch information
sirainen authored and GitLab committed May 20, 2017
1 parent 67c25cb commit 0840645
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/imap/imap-client.h
Expand Up @@ -105,7 +105,7 @@ struct client_command_context {
struct client_command_stats stats;
struct client_command_stats_start stats_start;

struct client_sync_context *sync;
struct imap_client_sync_context *sync;

bool uid:1; /* used UID command */
bool cancel:1; /* command is wanted to be cancelled */
Expand Down
9 changes: 9 additions & 0 deletions src/imap/imap-sync-private.h
Expand Up @@ -3,6 +3,15 @@

#include "imap-sync.h"

struct imap_client_sync_context {
/* if multiple commands are in progress, we may need to wait for them
to finish before syncing mailbox. */
unsigned int counter;
enum mailbox_sync_flags flags;
enum imap_sync_flags imap_flags;
const char *tagline;
};

struct imap_sync_context {
struct client *client;
struct mailbox *box;
Expand Down
11 changes: 1 addition & 10 deletions src/imap/imap-sync.c
Expand Up @@ -13,15 +13,6 @@
#include "imap-commands.h"
#include "imap-sync-private.h"

struct client_sync_context {
/* if multiple commands are in progress, we may need to wait for them
to finish before syncing mailbox. */
unsigned int counter;
enum mailbox_sync_flags flags;
enum imap_sync_flags imap_flags;
const char *tagline;
};

static void uids_to_seqs(struct mailbox *box, ARRAY_TYPE(seq_range) *uids)
{
T_BEGIN {
Expand Down Expand Up @@ -755,7 +746,7 @@ bool cmd_sync(struct client_command_context *cmd, enum mailbox_sync_flags flags,
}
cmd->tagline_reply = p_strdup(cmd->pool, tagline);

cmd->sync = p_new(cmd->pool, struct client_sync_context, 1);
cmd->sync = p_new(cmd->pool, struct imap_client_sync_context, 1);
cmd->sync->counter = client->sync_counter;
cmd->sync->flags = flags;
cmd->sync->imap_flags = imap_flags;
Expand Down

0 comments on commit 0840645

Please sign in to comment.