aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-01-19 14:45:15 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2006-01-19 14:45:15 +0100
commite8f8b187fea053e207224848720514372ede8d4b (patch)
tree9182ed335905835cb957a6202cf0bcc88198adeb
parent92ad3d44da447199f45dbc438d061cc4e2261dbd (diff)
Fixed read() error handling in Jabber module.
-rw-r--r--protocols/jabber/jabber.c2
-rw-r--r--protocols/oscar/oscar.c1
2 files changed, 2 insertions, 1 deletions
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);