From: Thadeu Lima de Souza Cascardo Date: Thu, 2 Jul 2009 17:59:08 +0000 (-0300) Subject: Dispatch connect event. X-Git-Tag: v0.1.3~69 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Frnetproxy.git;a=commitdiff_plain;h=0139cf387facfd85cb9fbc536b1c010679d2359a Dispatch connect event. The connect event is needed to do TLS handshaking. This is not the best implementation, since we don't do async connections right now. --- diff --git a/iochannel.c b/iochannel.c index 8005af1..a7c4742 100644 --- a/iochannel.c +++ b/iochannel.c @@ -118,6 +118,8 @@ hc_conn_new (int fd, HCClientFunc func, gpointer data) conn->write = hc_conn_channel_write; conn->close = hc_conn_channel_close; conn->watch = g_io_add_watch (conn->channel, G_IO_IN, hc_conn_watch, conn); + if (conn->func) + conn->func (conn, HC_EVENT_CONNECT, conn->data); return conn; }