# HG changeset patch # User Christian Hammond # Date 1086487679 0 # Node ID 9e328949997726160256ba0d5863f47ebc5c6bb1 # Parent 2645d2ccbe809f2358cc76bba6bcfc4b319681d8 [gaim-migrate @ 9985] Patch by Evan Schoenberg. The disconnected UI op was called twice on connection errors. Now it is only called once. He describes it as follows: "Currently, the UI's disconnected callback is called twice when there is a connection error. First, it is called by gaim_connection_error(). Then, gaim_connection_disconnect_cb is called, leading to a call to gaim_connection_set_state() at which point the gc's state is set to GAIM_DISCONNECTED. Finally, the UI's disconnected callback is called once the state is set to GAIM_DISCONNECTED. The call in gaim_connection_error() is incorrect; there is no need to manually call the UI's disconnected callback. It causes really nasty problems for smart reconnection handling and is wasteful. :)" committer: Tailor Script diff -r 2645d2ccbe80 -r 9e3289499977 ChangeLog --- a/ChangeLog Sun Jun 06 01:44:19 2004 +0000 +++ b/ChangeLog Sun Jun 06 02:07:59 2004 +0000 @@ -20,6 +20,8 @@ the buddy list (Pekka Riikonen) * Parallel compiles of the perl plugin should work better (Stu Tomlinson) + * The disconnected UI op was called twice on connection errors. Now + it is only called once. (Evan Schoenberg). version 0.78 (05/30/2004): New Features: diff -r 2645d2ccbe80 -r 9e3289499977 src/connection.c --- a/src/connection.c Sun Jun 06 01:44:19 2004 +0000 +++ b/src/connection.c Sun Jun 06 02:07:59 2004 +0000 @@ -401,13 +401,13 @@ gaim_log_write(log, GAIM_MESSAGE_SYSTEM, gaim_account_get_username(account), time(NULL), msg); - g_free(msg); + g_free(msg); } gaim_account_destroy_log(account); if (ops != NULL && ops->disconnected != NULL) - ops->disconnected(gc); + ops->disconnected(gc); } } @@ -503,9 +503,6 @@ if (ops != NULL) { if (ops->report_disconnect != NULL) ops->report_disconnect(gc, text); - - if (ops->disconnected != NULL) - ops->disconnected(gc); } gc->disconnect_timeout = gaim_timeout_add(0, gaim_connection_disconnect_cb,