commit b139071: [Project] Adopt lua libraries for http context

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Feb 19 18:00:09 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-02-19 17:56:59 +0000
URL: https://github.com/rspamd/rspamd/commit/b13907192f14c0a5171b225c21ffbcedfec3d501

[Project] Adopt lua libraries for http context

---
 src/lua/lua_dns_resolver.c |  2 ++
 src/lua/lua_http.c         | 17 ++++++++---------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/lua/lua_dns_resolver.c b/src/lua/lua_dns_resolver.c
index 362a6b35e..b68e15397 100644
--- a/src/lua/lua_dns_resolver.c
+++ b/src/lua/lua_dns_resolver.c
@@ -301,6 +301,8 @@ lua_push_dns_reply (lua_State *L, const struct rdns_reply *reply)
 
 				lua_rawseti (L, -2, ++i);
 				break;
+			default:
+				continue;
 			}
 		}
 		lua_pushnil (L);
diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c
index 2ca01d8a5..8c3dfb929 100644
--- a/src/lua/lua_http.c
+++ b/src/lua/lua_http.c
@@ -379,23 +379,22 @@ lua_http_make_connection (struct lua_http_cbdata *cbd)
 	cbd->fd = fd;
 
 	if (cbd->cfg) {
-		cbd->conn = rspamd_http_connection_new (NULL,
+		cbd->conn = rspamd_http_connection_new (
+				NULL,
+				NULL,
 				lua_http_error_handler,
 				lua_http_finish_handler,
 				RSPAMD_HTTP_CLIENT_SIMPLE,
-				RSPAMD_HTTP_CLIENT,
-				NULL,
-				(cbd->flags & RSPAMD_LUA_HTTP_FLAG_NOVERIFY) ?
-				cbd->cfg->libs_ctx->ssl_ctx_noverify : cbd->cfg->libs_ctx->ssl_ctx);
+				RSPAMD_HTTP_CLIENT);
 	}
 	else {
-		cbd->conn = rspamd_http_connection_new (NULL,
+		cbd->conn = rspamd_http_connection_new (
+				NULL,
+				NULL,
 				lua_http_error_handler,
 				lua_http_finish_handler,
 				RSPAMD_HTTP_CLIENT_SIMPLE,
-				RSPAMD_HTTP_CLIENT,
-				NULL,
-				NULL);
+				RSPAMD_HTTP_CLIENT);
 	}
 
 	if (cbd->conn) {


More information about the Commits mailing list