Converted these images to PNG, saving a handful of bytes per image
[adiumx.git] / Utilities / dep-build-scripts / libpurple_flap_connection_validity.diff
blob7dcdb280920bf0973a1b5fb828ca122d4ce414cb
2 # old_revision [20e2add42a314b4914e798757eb2a69ac3b491d0]
4 # patch "libpurple/protocols/oscar/flap_connection.c"
5 # from [b3c9d505d8cd6772ff3d3ea77d62e0202cf0eb00]
6 # to [5889cc26d7c52e57b425237145f7a88a21e2968b]
8 ============================================================
9 --- libpurple/protocols/oscar/flap_connection.c b3c9d505d8cd6772ff3d3ea77d62e0202cf0eb00
10 +++ libpurple/protocols/oscar/flap_connection.c 5889cc26d7c52e57b425237145f7a88a21e2968b
11 @@ -33,6 +33,9 @@
12 #include "win32dep.h"
13 #endif
15 +static GList *flap_connections = NULL;
16 +#define PURPLE_FLAP_CONNECTION_IS_VALID(conn) (g_list_find(flap_connections, (conn)) != NULL)
18 /**
19 * This sends a channel 1 SNAC containing the FLAP version.
20 * The FLAP version is sent by itself at the beginning of every
21 @@ -273,6 +276,7 @@ flap_connection_new(OscarData *od, int t
22 conn->queued_snacs = g_queue_new();
24 od->oscar_connections = g_slist_prepend(od->oscar_connections, conn);
25 + flap_connections = g_list_append(flap_connections, conn);
27 return conn;
29 @@ -359,6 +363,10 @@ flap_connection_destroy_cb(gpointer data
30 aim_rxcallback_t userfunc;
32 conn = data;
34 + if (!PURPLE_FLAP_CONNECTION_IS_VALID(conn))
35 + return FALSE;
37 od = conn->od;
38 account = (PURPLE_CONNECTION_IS_VALID(od->gc) ? purple_connection_get_account(od->gc) : NULL);
40 @@ -440,6 +448,8 @@ flap_connection_destroy_cb(gpointer data
41 if (conn->queued_timeout > 0)
42 purple_timeout_remove(conn->queued_timeout);
44 + flap_connections = g_list_remove(flap_connections, conn);
46 g_free(conn);
48 return FALSE;