changeset 30026:538ca314c5f8

More minor fixes. Spelling, extra variables, etc.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 19 Apr 2010 07:11:46 +0000
parents ec3bbe476cc1
children e7d298d270bc
files libpurple/protocols/msn/msg.c
diffstat 1 files changed, 10 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msg.c	Sun Apr 11 07:39:02 2010 +0000
+++ b/libpurple/protocols/msn/msg.c	Mon Apr 19 07:11:46 2010 +0000
@@ -1124,28 +1124,24 @@
 
 	if (command == NULL || cookie == NULL) {
 		purple_debug_warning("msn",
-			"Invalid invitation message: "
-			"either Invitation-Command or Invitation-Cookie is missing or invaild"
+			"Invalid invitation message: either Invitation-Command "
+			"or Invitation-Cookie is missing or invalid.\n"
 		);
 		return;
 
 	} else if (!strcmp(command, "INVITE")) {
-
 		const gchar	*guid = g_hash_table_lookup(body, "Application-GUID");
 	
 		if (guid == NULL) {
-			const gchar *cmd = g_hash_table_lookup(
-					body, "Invitation-Command");
-
-			if (cmd && !strcmp(cmd, "CANCEL")) {
+			if (!strcmp(command, "CANCEL")) {
 				const gchar *code = g_hash_table_lookup(
 						body, "Cancel-Code");
 				purple_debug_info("msn",
 						"MSMSGS invitation cancelled: %s.\n",
 						code ? code : "no reason given");
 			} else
-				purple_debug_warning("msn", "Invite msg missing "
-						"Application-GUID.\n");
+				purple_debug_warning("msn",
+				                     "Invite msg missing Application-GUID.\n");
 
 			accepted = TRUE;
 
@@ -1179,7 +1175,7 @@
 		} else {
 			const gchar *application = g_hash_table_lookup(body, "Application-Name");
 			purple_debug_warning("msn", "Unhandled invite msg with GUID %s: %s.\n",
-					     guid, application ? application : "(null)");
+			                     guid, application ? application : "(null)");
 		}
 		
 		if (!accepted) {
@@ -1193,9 +1189,9 @@
 			msn_message_set_flag(cancel, 'U');
 
 			text = g_strdup_printf("Invitation-Command: CANCEL\r\n"
-					       "Invitation-Cookie: %s\r\n"
-					       "Cancel-Code: REJECT_NOT_INSTALLED\r\n",
-					       cookie);
+			                       "Invitation-Cookie: %s\r\n"
+			                       "Cancel-Code: REJECT_NOT_INSTALLED\r\n",
+			                       cookie);
 			msn_message_set_bin_data(cancel, text, strlen(text));
 			g_free(text);
 
@@ -1205,7 +1201,7 @@
 
 	} else {
 		/*
-		 * Some other already estabilished invitation session.
+		 * Some other already established invitation session.
 		 * Can be retrieved by Invitation-Cookie.
 		 */
 	}