X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=ssl.c;h=7c7548318ee169ff4fc2aed1f8e3ac114d3e2aed;hb=7d977044b91b7397600510842ff71d9693938a51;hp=c1bfc885a02cbade4310bd71b4b829e54859ccd2;hpb=dff33f5dcf96800863b162a320bcf5dc0bb15b92;p=cascardo%2Frnetproxy.git diff --git a/ssl.c b/ssl.c index c1bfc88..7c75483 100644 --- a/ssl.c +++ b/ssl.c @@ -19,7 +19,6 @@ */ #include -#include #include #include #include @@ -36,17 +35,12 @@ ssl_close (net_hook_t *hook) if (hook->peer) { hook->peer->peer = NULL; - gnet_conn_disconnect (hook->peer->conn); + hc_conn_close (hook->peer->conn); } - gnet_conn_delete (hook->conn); + hc_conn_close (hook->conn); g_slice_free (net_hook_t, hook); } -static void -ssl_write (net_hook_t *hook) -{ -} - static void ssl_read (net_hook_t *hook, gchar *buffer, size_t len) { @@ -60,7 +54,7 @@ ssl_error (net_hook_t *hook) } net_hook_t * -ssl_hook_new (GConn *conn, char *server, int port) +ssl_hook_new (HCConn *conn, char *server, char *port) { net_hook_t *hook; hook = g_slice_new (net_hook_t); @@ -69,11 +63,10 @@ ssl_hook_new (GConn *conn, char *server, int port) hook->server = FALSE; hook->connect = ssl_connect; hook->close = ssl_close; - hook->write = ssl_write; hook->read = ssl_read; hook->data = NULL; hook->peer = ssl_server_hook_new (hook, server, port); - gnet_conn_set_callback (hook->conn, nethook_event, hook); + hc_conn_set_callback (hook->conn, nethook_event, hook); return hook; }