]> source.dussan.org Git - rspamd.git/commitdiff
Fix client.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 7 Oct 2015 15:01:40 +0000 (16:01 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 7 Oct 2015 15:01:40 +0000 (16:01 +0100)
src/client/rspamdclient.c

index 7f4e8aff57d767bde962917c30945e1d31d57200..7aeb6ba8d4dadc329b587aa49bd3f6c6e3e58582 100644 (file)
@@ -247,7 +247,7 @@ rspamd_client_command (struct rspamd_client_connection *conn,
                        return FALSE;
                }
 
-               req->msg->body = g_string_new_len (input->str, input->len);
+               req->msg->body = rspamd_fstring_new_init (input->str, input->len);
                req->input = input;
        }
        else {
@@ -261,8 +261,8 @@ rspamd_client_command (struct rspamd_client_connection *conn,
                rspamd_http_message_add_header (req->msg, hn, hv);
        }
 
-       g_string_append_c (req->msg->url, '/');
-       g_string_append (req->msg->url, command);
+       req->msg->url = rspamd_fstring_append (req->msg->url, "/", 1);
+       req->msg->url = rspamd_fstring_append (req->msg->url, command, strlen (command));
 
        conn->req = req;