From: Thadeu Lima de Souza Cascardo Date: Fri, 3 Jul 2009 04:49:54 +0000 (-0300) Subject: Make null hook use SSL connection driver and pop3s port by default. X-Git-Tag: v0.1.3~54 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Frnetproxy.git;a=commitdiff_plain;h=1148a1c1d952687367d755cdc0e779e5ff32b43f Make null hook use SSL connection driver and pop3s port by default. This null hook should get parameters for both the port and SSL support. Using URIs would be the best way to do it. --- diff --git a/null.c b/null.c index a543af8..2e3e265 100644 --- a/null.c +++ b/null.c @@ -50,6 +50,7 @@ static net_hook_t* null_server_hook_new (net_hook_t* client_hook, char *server) { net_hook_t* hook; int fd; + HCConn *conn; hook = g_slice_new (net_hook_t); hook->peer = client_hook; hook->server = TRUE; @@ -57,9 +58,11 @@ static net_hook_t* null_server_hook_new (net_hook_t* client_hook, char *server) hook->close = null_close; hook->read = null_read; hook->data = NULL; + conn = hc_conn_new (NULL, NULL); hook->conn = hc_conn_new (nethook_event, hook); - fd = hc_tcp_connect (server, "110"); - hc_conn_set_driver_channel (hook->conn, fd); + fd = hc_tcp_connect (server, "995"); + hc_conn_set_driver_channel (conn, fd); + hc_conn_set_driver_ssl (hook->conn, conn); return hook; }