[Pidgin] #15748: Docs aren't clear about purple_connection_error and close callback

Pidgin trac at pidgin.im
Sun Sep 8 15:50:55 EDT 2013


#15748: Docs aren't clear about purple_connection_error and close callback
---------------------+-----------------------
 Reporter:  seishun  |      Owner:
     Type:  defect   |     Status:  new
Milestone:           |  Component:  libpurple
  Version:  2.10.7   |   Keywords:
---------------------+-----------------------
 Calling purple_connection_error causes the prpl's close callback to be
 called, which is kiiinda implied by the "Closes a connection" part.
 However, a look at the source code reveals that the call is scheduled to
 be executed on a later tick:

 {{{#!c
         gc->disconnect_timeout = purple_timeout_add(0,
 purple_connection_disconnect_cb,
                         purple_connection_get_account(gc));
 }}}

 This is not clear from the documentation at all, which can cause bugs in
 protocol plugins because a developer might assume the close callback is
 always called immediately (happened to me).

-- 
Ticket URL: <https://developer.pidgin.im/ticket/15748>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list