Mercurial > pidgin
comparison src/protocols/irc/irc.c @ 6369:1cdc8a11eea5
[gaim-migrate @ 6874]
this should fix up a lockup on disconnect
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 04 Aug 2003 20:10:24 +0000 |
parents | 07b30424146b |
children | 8f94cce8faa5 |
comparison
equal
deleted
inserted
replaced
6368:41e6d15f4687 | 6369:1cdc8a11eea5 |
---|---|
308 } | 308 } |
309 | 309 |
310 if ((len = read(irc->fd, irc->inbuf + irc->inbufused, IRC_INITIAL_BUFSIZE - 1)) < 0) { | 310 if ((len = read(irc->fd, irc->inbuf + irc->inbufused, IRC_INITIAL_BUFSIZE - 1)) < 0) { |
311 gaim_connection_error(gc, "Read error"); | 311 gaim_connection_error(gc, "Read error"); |
312 return; | 312 return; |
313 } | 313 } else if (len == 0) { |
314 /* Remote closed the connection, probably */ | |
315 return; | |
316 } | |
317 | |
314 irc->inbufused += len; | 318 irc->inbufused += len; |
315 irc->inbuf[irc->inbufused] = '\0'; | 319 irc->inbuf[irc->inbufused] = '\0'; |
316 | 320 |
317 for (cur = irc->inbuf; cur < irc->inbuf + irc->inbufused && (end = strstr(cur, "\r\n")); cur = end + 2) { | 321 for (cur = irc->inbuf; cur < irc->inbuf + irc->inbufused && (end = strstr(cur, "\r\n")); cur = end + 2) { |
318 *end = '\0'; | 322 *end = '\0'; |