Mercurial > pidgin
changeset 15364:bb8b9d5604cb
[gaim-migrate @ 18157]
for bug 1638609, disconnect the signal when the account goes offline
committer: Tailor Script <tailor@pidgin.im>
author | Christopher O'Brien <siege@pidgin.im> |
---|---|
date | Thu, 18 Jan 2007 17:57:46 +0000 |
parents | d9ef62fb7e7b |
children | 7162a5ebb2f7 |
files | libgaim/protocols/sametime/sametime.c |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libgaim/protocols/sametime/sametime.c Thu Jan 18 17:41:47 2007 +0000 +++ b/libgaim/protocols/sametime/sametime.c Thu Jan 18 17:57:46 2007 +0000 @@ -1470,19 +1470,25 @@ /* start watching for new conversations */ gaim_signal_connect(gaim_conversations_get_handle(), - "conversation-created", pd->gc, + "conversation-created", pd, GAIM_CALLBACK(conversation_created_cb), pd); /* watch for group extended menu items */ gaim_signal_connect(gaim_blist_get_handle(), - "blist-node-extended-menu", pd->gc, + "blist-node-extended-menu", pd, GAIM_CALLBACK(blist_node_menu_cb), pd); - + /* use our services to do neat things */ services_starting(pd); } +static void session_stopping(struct mwGaimPluginData *pd) { + /* stop watching the signals from session_started */ + gaim_signals_disconnect_by_handle(pd); +} + + static void mw_session_stateChange(struct mwSession *session, enum mwSessionState state, gpointer info) { @@ -1541,6 +1547,9 @@ break; case mwSession_STOPPING: + + session_stopping(pd); + if(GPOINTER_TO_UINT(info) & ERR_FAILURE) { char *err = mwError(GPOINTER_TO_UINT(info)); gaim_connection_error(gc, err);