From e8f8b187fea053e207224848720514372ede8d4b Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 19 Jan 2006 14:45:15 +0100 Subject: Fixed read() error handling in Jabber module. --- protocols/jabber/jabber.c | 2 +- protocols/oscar/oscar.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index d4b5bde5..ba652b8a 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -412,7 +412,7 @@ static void gjab_recv(gjconn gjc) XML_Parse(gjc->parser, buf, len, 0); if (jd->die) signoff(GJ_GC(gjc)); - } else if (len < 0 || errno != EAGAIN) { + } else if (len == 0 || (len < 0 && (!sockerr_again() || gjc->ssl))) { STATE_EVT(JCONN_STATE_OFF) } } diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index b4bfb220..4e552bce 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -607,6 +607,7 @@ static void damn_you(gpointer data, gint source, GaimInputCondition c) g_free(pos); return; } + /* [WvG] Wheeeee! Who needs error checking anyway? ;-) */ read(pos->fd, m, 16); m[16] = '\0'; gaim_input_remove(pos->inpa); -- cgit v1.2.3