X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=null.c;h=a543af864d8d4a0f9b2abe879cd507fa94e28d0c;hb=d94d404ce54df23ce24cb7787e83b7747631b4af;hp=64cb074663f4e96c81c538b2f16cf62d7a448bb6;hpb=873a90517d2fa0538a7ce07c139a53f4cc42a61c;p=cascardo%2Frnetproxy.git diff --git a/null.c b/null.c index 64cb074..a543af8 100644 --- a/null.c +++ b/null.c @@ -49,6 +49,7 @@ static void null_error (net_hook_t* hook) static net_hook_t* null_server_hook_new (net_hook_t* client_hook, char *server) { net_hook_t* hook; + int fd; hook = g_slice_new (net_hook_t); hook->peer = client_hook; hook->server = TRUE; @@ -56,7 +57,9 @@ 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; - hook->conn = hc_conn_new (hc_tcp_connect (server, "110"), nethook_event, hook); + hook->conn = hc_conn_new (nethook_event, hook); + fd = hc_tcp_connect (server, "110"); + hc_conn_set_driver_channel (hook->conn, fd); return hook; }