diff options
Diffstat (limited to 'net-im/pidgin/files/pidgin-2.5.4-icq.patch')
-rw-r--r-- | net-im/pidgin/files/pidgin-2.5.4-icq.patch | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/net-im/pidgin/files/pidgin-2.5.4-icq.patch b/net-im/pidgin/files/pidgin-2.5.4-icq.patch index 3af838499c79..77f128059df1 100644 --- a/net-im/pidgin/files/pidgin-2.5.4-icq.patch +++ b/net-im/pidgin/files/pidgin-2.5.4-icq.patch @@ -1,19 +1,31 @@ -diff -urN pidgin-2.5.4.orig/libpurple/protocols/oscar/flap_connection.c pidgin-2.5.4/libpurple/protocols/oscar/flap_connection.c ---- pidgin-2.5.4.orig/libpurple/protocols/oscar/flap_connection.c 2009-02-04 10:58:55.000000000 +0300 -+++ pidgin-2.5.4/libpurple/protocols/oscar/flap_connection.c 2009-02-04 11:13:55.000000000 +0300 -@@ -317,12 +317,15 @@ - { - FlapConnection *conn; +--- pidgin-2.5.4/libpurple/protocols/oscar/flap_connection.c.orig 2009-01-23 00:09:41.000000000 +0500 ++++ pidgin-2.5.4/libpurple/protocols/oscar/flap_connection.c 2009-01-23 16:12:00.000000000 +0500 +@@ -1052,10 +1052,27 @@ + byte_stream_destroy(&bs); + } -+ static const guint FlapLoginSeqs[] = { 5695, 23595, 23620, 23049, 0x2886, 0x2493, 23620, 23049, 2853, 17372, 1255, 1796, 1657, 13606, 1930, 23918, 31234, 30120, 0x1BEA, 0x5342, 0x30CC, 0x2294, 0x5697,0x25FA, 0x3303, 0x078A, 0x0FC5, 0x25D6, 0x26EE,0x7570, 0x7F33, 0x4E94, 0x07C9, 0x7339, 0x42A8 }; ++guint16 ++generate_flap_sequence() ++{ ++ guint32 n = g_random_int(), s = 0, i; ++ for (i = n; i >>= 3; s += i); ++ return (((0 - s) ^ (guint)n) & 7 ^ n) + 3; ++} + - conn = g_new0(FlapConnection, 1); - conn->od = od; - conn->buffer_outgoing = purple_circ_buffer_new(0); - conn->fd = -1; - conn->subtype = -1; - conn->type = type; -+ conn->seqnum_out = FlapLoginSeqs[g_random_int_range(0, (sizeof FlapLoginSeqs) / (sizeof FlapLoginSeqs[0]))] - 1; - - od->oscar_connections = g_slist_prepend(od->oscar_connections, conn); - + void + flap_connection_send(FlapConnection *conn, FlapFrame *frame) + { +- frame->seqnum = ++(conn->seqnum_out); ++ if (frame->channel == 0x01) ++ { ++ frame->seqnum = generate_flap_sequence(); ++ conn->seqnum_out = frame->seqnum; ++ } else ++ frame->seqnum = ++(conn->seqnum_out); ++ ++ purple_debug_info("oscar", "Sent FLAP seqid=%d\n", ++ frame->seqnum); ++ + sendframe_flap(conn, frame); + flap_frame_destroy(frame); + } |