diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-11-30 19:26:06 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-11-30 19:26:06 +0300 |
commit | 4dce4df79683f5562d557ef80f8e2a648aacf5e8 (patch) | |
tree | 411bbc76c26b974340047d854d51bbc42f331e0e /src/controller.c | |
parent | 569df8dd24eb159b069ca7f5efa6a6ba3336d63d (diff) | |
download | rspamd-4dce4df79683f5562d557ef80f8e2a648aacf5e8.tar.gz rspamd-4dce4df79683f5562d557ef80f8e2a648aacf5e8.zip |
* Adopt printf function from nginx for comfortable printing of some data types (fixed strings, pids etc)
* Fix work of http maps (they were broken in some places before)
* Fix sync of statfiles (not fully tested yet)
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controller.c b/src/controller.c index 31bad233a..2c541b2e9 100644 --- a/src/controller.c +++ b/src/controller.c @@ -200,7 +200,7 @@ write_whole_statfile (struct controller_session *session, char *symbol, struct c /* Begin to copy all blocks into array */ statfile_get_revision (statfile, &rev, (time_t *)&time); len = statfile->cur_section.length * sizeof (struct rspamd_binlog_element); - i = snprintf (out_buf, sizeof (out_buf), "%lu %lu %lu", (long unsigned)rev, (long unsigned)time, (long unsigned)len); + i = snprintf (out_buf, sizeof (out_buf), "%lu %lu %lu" CRLF, (long unsigned)rev, (long unsigned)time, (long unsigned)len); rspamd_dispatcher_write (session->dispatcher, out_buf, i, TRUE, FALSE); out = memory_pool_alloc (session->session_pool, len); @@ -289,7 +289,7 @@ process_sync_command (struct controller_session *session, char **args) } while (binlog_sync (binlog, rev, &time, &data)) { - r = snprintf (out_buf, sizeof (out_buf), "%lu %lu %lu", (long unsigned)rev, (long unsigned)time, (long unsigned)data->len); + r = snprintf (out_buf, sizeof (out_buf), "%lu %lu %lu" CRLF, (long unsigned)rev, (long unsigned)time, (long unsigned)data->len); rspamd_dispatcher_write (session->dispatcher, out_buf, r, TRUE, FALSE); if (!rspamd_dispatcher_write (session->dispatcher, data->data, data->len, TRUE, FALSE)) { if (data != NULL) { |