From 00c91df4cfbcab0f47b02c1238187406b1d87428 Mon Sep 17 00:00:00 2001 From: kakwa Date: Tue, 30 Aug 2016 23:03:53 +0200 Subject: [PATCH] adapt to create_response new API --- src/lib/http.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/http.c b/src/lib/http.c index c8d2b7a..b2c73fa 100644 --- a/src/lib/http.c +++ b/src/lib/http.c @@ -88,16 +88,16 @@ int rfc3161_handler(struct mg_connection *conn, void *context) { // Send HTTP reply to the client if (is_tsq) { char *query = calloc(request_info->content_length, sizeof(char)); - mg_read(conn, query, request_info->content_length); + int query_len = mg_read(conn, query, request_info->content_length); - log_hex(ct, LOG_DEBUG, "query hexdump content", query, + log_hex(ct, LOG_DEBUG, "query hexdump content", (unsigned char *)query, request_info->content_length); - int ts_resp = - create_response(ct, query, ct->ts_ctx, &content_length, &content); + int ts_resp = create_response(ct, query, query_len, ct->ts_ctx, + &content_length, &content); if (ts_resp) { log_hex(ct, LOG_DEBUG, "response hexdump content", content, - content_length); + content_length); mg_printf(conn, "HTTP/1.1 200 OK\r\n" "Content-Type: application/timestamp-reply\r\n"