--- a/libpurple/protocols/msn/servconn.c Sat Nov 15 09:44:05 2008 +0000 +++ b/libpurple/protocols/msn/servconn.c Sat Nov 15 16:15:33 2008 +0000 @@ -366,17 +366,13 @@ read_cb(gpointer data, gint source, PurpleInputCondition cond) { MsnServConn *servconn; - MsnSession *session; char buf[MSN_BUF_LEN]; - char *cur, *end, *old_rx_buf; gssize len; - int cur_len; servconn = data; - session = servconn->session; if (servconn->type == MSN_SERVCONN_NS) - session->account->gc->last_received = time(NULL); + servconn->session->account->gc->last_received = time(NULL); len = read(servconn->fd, buf, sizeof(buf) - 1); if (len < 0 && errno == EAGAIN) @@ -396,6 +392,14 @@ memcpy(servconn->rx_buf + servconn->rx_len, buf, len + 1); servconn->rx_len += len; + msn_servconn_process_data(servconn); +} + +void msn_servconn_process_data(MsnServConn *servconn) +{ + char *cur, *end, *old_rx_buf; + int cur_len; + end = old_rx_buf = servconn->rx_buf; servconn->processing = TRUE;