Mercurial > pidgin
diff libgaim/protocols/msn/servconn.c @ 14281:ddedf15a9420
[gaim-migrate @ 16966]
If servconn is destroyed while it's in the process of
being established, make sure the new fd is closed.
Also, "0" is a valid file descriptor. It is pretty
much ALWAYS set to either stdin, stdout or stderr,
and then new file descriptors increment from there,
but I don't think there's actually a standard that
says that 0 must be one of those three.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 21 Aug 2006 22:58:26 +0000 |
parents | baff095b146c |
children | 118fd0dc5b6e |
line wrap: on
line diff
--- a/libgaim/protocols/msn/servconn.c Mon Aug 21 22:56:08 2006 +0000 +++ b/libgaim/protocols/msn/servconn.c Mon Aug 21 22:58:26 2006 +0000 @@ -176,13 +176,15 @@ if (servconn->wasted) { + if (source >= 0) + close(source); msn_servconn_destroy(servconn); return; } servconn->fd = source; - if (source > 0) + if (source >= 0) { servconn->connected = TRUE;