From f3252b34114236c65624862d2a572f5e290e8cc8 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 1 Mar 2013 14:34:21 +0100 Subject: Revamping for listeners. Split rs_connection into rs_baseconn plus rs_connection and rs_listener. Connections now has a state variable. Connect buffer event and fd of _source_ connection, not that of conn->active_peer. The connection object referred to by a peer is not meant for using as a connection, only for reporting errors on. Make sure things are sane even when not using a config file. Bump library interface version to 1.0.0 since it's changed. --- lib/udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/udp.c') diff --git a/lib/udp.c b/lib/udp.c index 71d7003..22a8375 100644 --- a/lib/udp.c +++ b/lib/udp.c @@ -129,7 +129,7 @@ _evcb (evutil_socket_t fd, short what, void *user_data) assert (msg); assert (msg->conn); - if (!msg->conn->is_connected) + if (msg->conn->state == RS_CONN_STATE_CONNECTING) event_on_connect (msg->conn, msg); if (msg->conn->out_queue) -- cgit v1.1