From 1148a1c1d952687367d755cdc0e779e5ff32b43f Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Fri, 3 Jul 2009 01:49:54 -0300 Subject: [PATCH] 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. --- null.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.20.1