static void connect_cb(gpointer data, gint source, const gchar *error_message) { MsnServConn *servconn; servconn = data; servconn->connect_data = NULL; servconn->processing = FALSE; if (servconn->wasted) { if (source >= 0) close(source); msn_servconn_destroy(servconn); return; } servconn->fd = source; if (source >= 0) { servconn->connected = TRUE; /* Someone wants to know we connected. */ servconn->connect_cb(servconn); servconn->inpa = gaim_input_add(servconn->fd, GAIM_INPUT_READ, read_cb, data); } else { msn_servconn_got_error(servconn, MSN_SERVCONN_ERROR_CONNECT); } }
static void connect_cb(gpointer data, gint source, const char *error_message) { MsnServConn *servconn; servconn = data; servconn->connect_data = NULL; servconn->fd = source; if (source >= 0) { servconn->connected = TRUE; /* Someone wants to know we connected. */ servconn->connect_cb(servconn); servconn->inpa = purple_input_add(servconn->fd, PURPLE_INPUT_READ, read_cb, data); servconn_timeout_renew(servconn); } else { purple_debug_error("msn", "Connection error: %s\n", error_message); msn_servconn_got_error(servconn, MSN_SERVCONN_ERROR_CONNECT, error_message); } }