Change from GNet to HCConn.
[cascardo/rnetproxy.git] / ssl.c
diff --git a/ssl.c b/ssl.c
index c1bfc88..299981d 100644 (file)
--- a/ssl.c
+++ b/ssl.c
@@ -19,7 +19,6 @@
 */
 
 #include <gnutls/gnutls.h>
-#include <gnet.h>
 #include <glib.h>
 #include <string.h>
 #include <errno.h>
@@ -36,9 +35,9 @@ 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);
 }
 
@@ -60,7 +59,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);
@@ -73,7 +72,7 @@ ssl_hook_new (GConn *conn, char *server, int port)
   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;
 }