[Pidgin] #480: Windows socket error when resuming from standby with beta7

Pidgin trac at pidgin.im
Mon Sep 10 16:25:46 EDT 2007


#480: Windows socket error when resuming from standby with beta7
------------------------------+---------------------------------------------
  Reporter:  KyroMaster       |       Owner:  datallah
      Type:  defect           |      Status:  reopened
  Priority:  minor            |   Milestone:          
 Component:  winpidgin (gtk)  |     Version:  2.0     
Resolution:                   |    Keywords:          
   Pending:  0                |  
------------------------------+---------------------------------------------
Comment (by imiganai):

 I'm not familiar with pidgin's code so I can't submit a patch (sorry), but
 handling standby should be very easy.

 1) Process the WM_POWERBROADCAST message.[[BR]]
 2) If wParam == PBT_APMSUSPEND, store the active state of the accounts and
 disconnect them.  ,,(The system allows approximately 20 seconds per
 application to process this message, and it's nicer than processing the
 PBT_QUERYSUSPEND message because -pidgin will never not grant permission
 to suspend -you'd have to handle failure cases and -you don't want Pidgin
 to disconnect and then reconnect when someone cancels a save in another
 program or something (thereby canceling the suspend)),,[[BR]]
 3) If wParam == PBT_RESUMESUSPEND, reconnect the previously active
 accounts and clear the state variable.  Note you can also process
 PBT_RESUMEAUTOMATIC for when the system is restored when the user is not
 present (for the purposes of away messages and such), and maybe do some
 clean reconnection code in PBT_RESUMECRITICAL, which is fired when Pidgin
 may not have received the PBT_SUSPEND message.[[BR]]
 4) Return TRUE, regardless of the message.

 Dunno if that inspires anyone to create a quick patch...

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


More information about the Tracker mailing list