diff src/protocols/msn/cmdproc.c @ 10225:ecf3ce2e2ab1

[gaim-migrate @ 11357] This is mostly a patch from Felipe Contreras that eliminates MSN switchboard errors and fixes MSN buddy icon syncronization, with some tweaks by me. Thank Felipe if it works, blame me if something broke. I also fixed a couple of text markup escaping things, fixed a glib warning that was bugging me, fix a rare SILC crash, and make gtkstatusselector.c compile (but do nothing) with gtk < 2.4 committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 21 Nov 2004 17:48:09 +0000
parents 700f8fb9e581
children f776e117c17b
line wrap: on
line diff
--- a/src/protocols/msn/cmdproc.c	Sun Nov 21 06:16:23 2004 +0000
+++ b/src/protocols/msn/cmdproc.c	Sun Nov 21 17:48:09 2004 +0000
@@ -250,6 +250,10 @@
 	if (cmd->trId)
 		trans = msn_history_find(cmdproc->history, cmd->trId);
 
+	if (trans != NULL)
+		if (trans->timer)
+			gaim_timeout_remove(trans->timer);
+
 	if (g_ascii_isdigit(cmd->command[0]))
 	{
 		if (trans != NULL)
@@ -258,11 +262,17 @@
 			int error;
 
 			error = atoi(cmd->command);
-			if (cmdproc->cbs_table->errors != NULL)
+
+			if (trans->error_cb != NULL)
+				error_cb = trans->error_cb;
+
+			if (error_cb == NULL && cmdproc->cbs_table->errors != NULL)
 				error_cb = g_hash_table_lookup(cmdproc->cbs_table->errors, trans->command);
 
 			if (error_cb != NULL)
+			{
 				error_cb(cmdproc, trans, error);
+			}
 			else
 			{
 #if 1