From 1f684709f66b5784ab94b8a52a76c1a4e5e30535 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 7 Oct 2015 16:15:34 +0100 Subject: Fix more client issues. --- src/client/rspamc.c | 4 ++-- src/client/rspamdclient.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/rspamc.c b/src/client/rspamc.c index 150c780a1..1d9252147 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -796,7 +796,7 @@ rspamc_output_headers (FILE *out, struct rspamd_http_message *msg) LL_FOREACH (msg->headers, h) { - rspamd_fprintf (out, "%v: %v\n", h->name, h->value); + rspamd_fprintf (out, "%T: %T\n", h->name, h->value); } rspamd_fprintf (out, "\n"); } @@ -1107,7 +1107,7 @@ rspamc_client_cb (struct rspamd_client_connection *conn, if (json && msg != NULL && msg->body != NULL) { /* We can also output the resulting json */ - rspamd_fprintf (out, "%v\n", msg->body); + rspamd_fprintf (out, "%V\n", msg->body); } } } diff --git a/src/client/rspamdclient.c b/src/client/rspamdclient.c index 7aeb6ba8d..dfedb2cae 100644 --- a/src/client/rspamdclient.c +++ b/src/client/rspamdclient.c @@ -124,9 +124,9 @@ rspamd_client_finish_handler (struct rspamd_http_connection *conn, } else { if (msg->body == NULL || msg->body->len == 0 || msg->code != 200) { - err = g_error_new (RCLIENT_ERROR, msg->code, "HTTP error: %d, %s", + err = g_error_new (RCLIENT_ERROR, msg->code, "HTTP error: %d, %.*s", msg->code, - msg->status ? msg->status->str : "unknown error"); + (gint)msg->status->len, msg->status->str); req->cb (c, msg, c->server_name->str, NULL, req->input, req->ud, err); g_error_free (err); -- cgit v1.2.3