[Pidgin] #8198: Pidgin client blocked by AOL (ICQ)

Pidgin trac at pidgin.im
Thu Jan 22 13:38:45 EST 2009


#8198: Pidgin client blocked by AOL (ICQ)
--------------------+-------------------------------------------------------
 Reporter:  init    |        Owner:  MarkDoliner
     Type:  defect  |       Status:  new        
Milestone:          |    Component:  ICQ        
  Version:  2.5.4   |   Resolution:             
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by NightFox):

 I've made fix. Seems to be working for me. Here is a patch:
 Add function randrange and replace function  flap_connection_send() to
 this:


 {{{
 inline int randrange(int lo, int hi) { return rand() / (RAND_MAX / (hi -
 lo + 1)) + lo; }

 void
 flap_connection_send(FlapConnection *conn, FlapFrame *frame)
 {
         int LoginSeq;
         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,
         0x3C26, 0x3303, 0x078A, 0x0FC5,
         0x25D6, 0x26EE,0x7570, 0x7F33,
         0x4E94, 0x07C9, 0x7339, 0x42A8
         };

         if (frame->channel == 0x01)
         {
         srand (time (NULL));
         LoginSeq = randrange(0, (sizeof  FlapLoginSeqs) / (sizeof
 FlapLoginSeqs[0]));
         frame->seqnum = FlapLoginSeqs[LoginSeq];
         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);
 }
 }}}

-- 
Ticket URL: <http://developer.pidgin.im/ticket/8198#comment:66>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list