Lines Matching refs:user
13 struct replicator_user *user;
110 struct replicator_user *user = ctx->user;
112 if (!replicator_user_unref(&user)) {
113 /* user was already removed */
116 /* user no longer exists, or is not wanted for replication,
118 replicator_queue_remove(ctx->brain->queue, &ctx->user);
120 i_free(ctx->user->state);
121 ctx->user->state = i_strdup_empty(state);
122 ctx->user->last_sync_failed = reply != DSYNC_REPLY_OK;
124 ctx->user->last_successful_sync = ioloop_time;
125 replicator_queue_push(ctx->brain->queue, ctx->user);
133 dsync_replicate(struct replicator_brain *brain, struct replicator_user *user)
144 next_full_sync = user->last_full_sync +
149 user->last_fast_sync = ioloop_time;
150 if (full || user->force_full_sync) {
151 user->last_full_sync = ioloop_time;
152 user->force_full_sync = FALSE;
156 user->priority = REPLICATION_PRIORITY_NONE;
160 ctx->user = user;
161 replicator_user_ref(user);
162 dsync_client_sync(conn, user->username, user->state, full,
175 struct replicator_user *user;
178 user = replicator_queue_pop(brain->queue, &next_secs);
179 if (user == NULL) {
187 if (!dsync_replicate(brain, user)) {
188 /* all connections were full, put the user back to queue */
189 replicator_queue_push(brain->queue, user);
192 /* replication started for the user */