Revision: 16966
Author: thekingant
Date: 2006-08-21 15:58:26 -0700 (Mon, 21 Aug 2006)
ViewCVS: http://svn.sourceforge.net/gaim/?rev=16966&view=rev
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/libgaim/protocols/msn/servconn.c
Modified: trunk/libgaim/protocols/msn/servconn.c
===================================================================
--- trunk/libgaim/protocols/msn/servconn.c 2006-08-21 22:56:08 UTC (rev 16965)
+++ trunk/libgaim/protocols/msn/servconn.c 2006-08-21 22:58:26 UTC (rev 16966)
@@ -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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|