diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-02-25 15:23:22 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-02-25 15:23:22 +0000 |
commit | d8833f06bd6272520a4d6994b54c0df43ca3c6f0 (patch) | |
tree | 03656d17fd1979d4f456717264ac43c04a7cd09b /src/client/rspamdclient.c | |
parent | fcf1b617ed850e7cbab47b37b37eda6a7db3b52c (diff) | |
download | rspamd-d8833f06bd6272520a4d6994b54c0df43ca3c6f0.tar.gz rspamd-d8833f06bd6272520a4d6994b54c0df43ca3c6f0.zip |
[Project] HTTP: Rework HTTP connections API to simplify its usage
Diffstat (limited to 'src/client/rspamdclient.c')
-rw-r--r-- | src/client/rspamdclient.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client/rspamdclient.c b/src/client/rspamdclient.c index 54cd490e6..a2ff85458 100644 --- a/src/client/rspamdclient.c +++ b/src/client/rspamdclient.c @@ -118,9 +118,7 @@ rspamd_client_finish_handler (struct rspamd_http_connection *conn, rspamd_http_connection_reset (c->http_conn); rspamd_http_connection_read_message (c->http_conn, c->req, - c->fd, - &c->timeout, - c->ev_base); + &c->timeout); return 0; } else { @@ -258,6 +256,7 @@ rspamd_client_init (struct rspamd_http_context *http_ctx, conn->fd = fd; conn->req_sent = FALSE; conn->http_conn = rspamd_http_connection_new (http_ctx, + fd, rspamd_client_body_handler, rspamd_client_error_handler, rspamd_client_finish_handler, @@ -443,12 +442,12 @@ rspamd_client_command (struct rspamd_client_connection *conn, if (compressed) { rspamd_http_connection_write_message (conn->http_conn, req->msg, NULL, - "application/x-compressed", req, conn->fd, - &conn->timeout, conn->ev_base); + "application/x-compressed", req, + &conn->timeout); } else { rspamd_http_connection_write_message (conn->http_conn, req->msg, NULL, - "text/plain", req, conn->fd, &conn->timeout, conn->ev_base); + "text/plain", req, &conn->timeout); } return TRUE; |