From 79cadba9454d2c6610cff538dd756414e6390bff Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Thu, 4 Jun 2015 16:43:12 +0300 Subject: [PATCH] bug fixes (minor); --- debian/files | 4 ++-- include/sntl/connection.h | 4 ++-- lib/connection.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/debian/files b/debian/files index 8a5d5a8..04196d2 100644 --- a/debian/files +++ b/debian/files @@ -1,2 +1,2 @@ -libsntl-dev_0.1.0_amd64.deb libdevel extra -libsntl_0.1.0_amd64.deb libs extra +libsntl-dev_0.2.0_amd64.deb libdevel extra +libsntl_0.2.0_amd64.deb libs extra diff --git a/include/sntl/connection.h b/include/sntl/connection.h index e03a457..9caa0f2 100644 --- a/include/sntl/connection.h +++ b/include/sntl/connection.h @@ -200,7 +200,7 @@ typedef struct __rpc_typed_list_type { extern conn_sys_t *conn_sys; /* an old obsolete method */ /* old API from 0.1.xx */ -#define connections_subsystem_init() { conn_sys = malloc(sizeof(conn_sys_t)); connections_init(conn_sys); } +#define connections_subsystem_init() { conn_sys = (conn_sys_t *)malloc(sizeof(conn_sys_t)); connections_init(conn_sys); } #define connections_subsystem_setsslserts(a, b, c) connections_setsslserts(conn_sys, a, b, c) @@ -234,7 +234,7 @@ int connections_setrpclist_function(conn_sys_t *ssys, /* connection - compatibility (old versions) macros */ #define connection_create(c, s) connection_create_fapi((c), (s), NULL) -#define connection_initiate(c, h, p, s, p1) connection_inititate_m(conn_sys, c, h, p, s, p1) +#define connection_initiate(c, h, p, s, p1) connection_initiate_m(conn_sys, c, h, p, s, p1) #define connection_create_fapi(c, s, a) connection_create_fapi_m(conn_sys, c, s, a) #ifdef __cplusplus extern "C" { diff --git a/lib/connection.c b/lib/connection.c index c152325..ef8e47e 100644 --- a/lib/connection.c +++ b/lib/connection.c @@ -1997,14 +1997,14 @@ int connection_initiate_m(conn_sys_t *ssys, conn_t *co, const char *host, goto __fall0; } else if(!ssys) goto __falleinval; - /* setup connections set */ - co->ssys = ssys; - if(!host) goto __falleinval; if(!SSL_cert) goto __falleinval; if(!pctx) goto __falleinval; memset(co, 0, sizeof(conn_t)); + /* setup connections set */ + co->ssys = ssys; + pth_dqtpoll_init(tpoll, __rpc_callback);