# HG changeset patch # User Christopher O'Brien # Date 1169143066 0 # Node ID bb8b9d5604cb3c56746384e2c7be4de195d4df10 # Parent d9ef62fb7e7bbb529931e6c6849f193cb4b57801 [gaim-migrate @ 18157] for bug 1638609, disconnect the signal when the account goes offline committer: Tailor Script diff -r d9ef62fb7e7b -r bb8b9d5604cb libgaim/protocols/sametime/sametime.c --- 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);