pidgin: 17b57512: Output an error if the notification id w...

qulogic at pidgin.im qulogic at pidgin.im
Mon Mar 14 00:37:48 EDT 2011


----------------------------------------------------------------------
Revision: 17b575126cb421d1171a9ec4354e8584e0d1934c
Parent:   fb4d2b014576462db99d919dea15fbed03f1f48a
Author:   qulogic at pidgin.im
Date:     03/13/11 19:40:42
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/17b575126cb421d1171a9ec4354e8584e0d1934c

Changelog: 

Output an error if the notification id was not 1 instead of it's just
407. If it is 407, then show the "too long" message, otherwise use a
generic error.

Refs #13468.

Changes against parent fb4d2b014576462db99d919dea15fbed03f1f48a

  patched  libpurple/protocols/msn/notification.c

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/notification.c	d2cf259e32d9efed7f9be8b21156e2afb9c8b44c
+++ libpurple/protocols/msn/notification.c	569f5e865a9ee55379da93e776a9e9a0e288c585
@@ -1186,13 +1186,18 @@ ipg_cmd_post(MsnCmdProc *cmdproc, MsnCom
 
 	id = xmlnode_get_attrib(msg, "id");
 
-	if (id && !strcmp(id, "407")) {
+	if (id && strcmp(id, "1")) {
 		PurpleConversation *conv
 			= purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY,
 			                                        who, gc->account);
 		if (conv != NULL) {
-			purple_conversation_write(conv, NULL,
-			                          _("Mobile message was not sent because it was too long."),
+			const char *error;
+			if (!strcmp(id, "407"))
+				error = _("Mobile message was not sent because it was too long.");
+			else
+				error = _("Mobile message was not sent because an unknown error occurred.");
+
+			purple_conversation_write(conv, NULL, error,
 			                          PURPLE_MESSAGE_ERROR, time(NULL));
 
 			if ((id = xmlnode_get_attrib(payloadNode, "id")) != NULL) {


More information about the Commits mailing list