pidgin: 0ed69cf2: Stop the watchers before closing the fds
markdoliner at pidgin.im
markdoliner at pidgin.im
Tue Jun 23 13:40:45 EDT 2009
-----------------------------------------------------------------
Revision: 0ed69cf2b265741af3347af48a5860815ab8f8f9
Ancestor: 5790948f378bba5703c7c6337a3733772b6039fb
Author: markdoliner at pidgin.im
Date: 2009-06-23T17:39:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0ed69cf2b265741af3347af48a5860815ab8f8f9
Modified files:
libpurple/protocols/oscar/flap_connection.c
ChangeLog:
Stop the watchers before closing the fds
-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/flap_connection.c 7f5ac0e9587c2aef4ab1dffb8e0c19e37c9a5c91
+++ libpurple/protocols/oscar/flap_connection.c ca8f03711a83e11ae911bcab7ef5f359be051ccb
@@ -355,24 +355,10 @@ flap_connection_close(OscarData *od, Fla
}
}
- if (conn->fd >= 0)
- {
- if (conn->type == SNAC_FAMILY_LOCATE)
- flap_connection_send_close(od, conn);
+ if ((conn->fd >= 0 || conn->gsc != NULL)
+ && conn->type == SNAC_FAMILY_LOCATE)
+ flap_connection_send_close(od, conn);
- close(conn->fd);
- conn->fd = -1;
- }
-
- if (conn->gsc != NULL)
- {
- if (conn->type == SNAC_FAMILY_LOCATE)
- flap_connection_send_close(od, conn);
-
- purple_ssl_close(conn->gsc);
- conn->gsc = NULL;
- }
-
if (conn->watcher_incoming != 0)
{
purple_input_remove(conn->watcher_incoming);
@@ -385,6 +371,18 @@ flap_connection_close(OscarData *od, Fla
conn->watcher_outgoing = 0;
}
+ if (conn->fd >= 0)
+ {
+ close(conn->fd);
+ conn->fd = -1;
+ }
+
+ if (conn->gsc != NULL)
+ {
+ purple_ssl_close(conn->gsc);
+ conn->gsc = NULL;
+ }
+
g_free(conn->buffer_incoming.data.data);
conn->buffer_incoming.data.data = NULL;
More information about the Commits
mailing list