Mercurial > dovecot > core-2.2
diff src/indexer/indexer-client.c @ 19170:250d85e784d1
fts: Send session ID to indexer and indexer-worker for logging purposes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 21 Sep 2015 17:01:05 +0300 |
parents | 3009a1a6f6d5 |
children | 9e120590e0ef |
line wrap: on
line diff
--- a/src/indexer/indexer-client.c Mon Sep 21 16:36:05 2015 +0300 +++ b/src/indexer/indexer-client.c Mon Sep 21 17:01:05 2015 +0300 @@ -67,9 +67,10 @@ const char *const *args, const char **error_r) { struct indexer_client_request *ctx = NULL; + const char *session_id = NULL; unsigned int tag, max_recent_msgs; - /* <tag> <user> <mailbox> [<max_recent_msgs>] */ + /* <tag> <user> <mailbox> [<max_recent_msgs> [<session ID>]] */ if (str_array_length(args) < 3) { *error_r = "Wrong parameter count"; return -1; @@ -83,6 +84,8 @@ else if (str_to_uint(args[3], &max_recent_msgs) < 0) { *error_r = "Invalid max_recent_msgs"; return -1; + } else { + session_id = args[4]; } if (tag != 0) { @@ -93,7 +96,7 @@ } indexer_queue_append(client->queue, append, args[1], args[2], - max_recent_msgs, ctx); + session_id, max_recent_msgs, ctx); o_stream_nsend_str(client->output, t_strdup_printf("%u\tOK\n", tag)); return 0; }