From: <tal...@us...> - 2007-01-18 17:57:48
|
Revision: 18157 http://svn.sourceforge.net/gaim/?rev=18157&view=rev Author: taliesein Date: 2007-01-18 09:57:46 -0800 (Thu, 18 Jan 2007) Log Message: ----------- for bug 1638609, disconnect the signal when the account goes offline Modified Paths: -------------- trunk/libgaim/protocols/sametime/sametime.c Modified: trunk/libgaim/protocols/sametime/sametime.c =================================================================== --- trunk/libgaim/protocols/sametime/sametime.c 2007-01-18 17:41:47 UTC (rev 18156) +++ trunk/libgaim/protocols/sametime/sametime.c 2007-01-18 17:57:46 UTC (rev 18157) @@ -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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |