From: Thadeu Lima de Souza Cascardo Date: Fri, 3 Jul 2009 21:14:21 +0000 (-0300) Subject: Use POP connection layer, reintroducing POP access control. X-Git-Tag: v0.1.3~37 X-Git-Url: http://git.cascardo.info/?p=cascardo%2Frnetproxy.git;a=commitdiff_plain;h=96741adac56ee52d9154a80988219c73f6aec3b9 Use POP connection layer, reintroducing POP access control. --- diff --git a/popproxy.c b/popproxy.c index 3b23773..9dfa8a8 100644 --- a/popproxy.c +++ b/popproxy.c @@ -80,6 +80,7 @@ static void new_client (int fd, struct sockaddr *addr, socklen_t saddr, gpointer data) { HCConn *conn; + HCConn *pop_conn; HCConn *server_conn; struct pop_address *address = data; if (fd < 0) @@ -98,9 +99,11 @@ new_client (int fd, struct sockaddr *addr, socklen_t saddr, gpointer data) conn = hc_conn_new (NULL, NULL); hc_conn_set_driver_channel (conn, fd); + pop_conn = hc_conn_new (NULL, NULL); + hc_conn_set_driver_pop (pop_conn, conn); - hc_conn_set_callback (conn, push_other, server_conn); - hc_conn_set_callback (server_conn, push_other, conn); + hc_conn_set_callback (pop_conn, push_other, server_conn); + hc_conn_set_callback (server_conn, push_other, pop_conn); }