comparison libpurple/protocols/msn/msg.c @ 30489:5044315e81e1

Wait, command can't be both INVITE and CANCEL at the same time.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Thu, 20 May 2010 08:14:20 +0000
parents 3f6daa187665
children 9623db527d1e 66e7fe9f7810
comparison
equal deleted inserted replaced
30488:dbe96260108c 30489:5044315e81e1
1148 1148
1149 } else if (!strcmp(command, "INVITE")) { 1149 } else if (!strcmp(command, "INVITE")) {
1150 const gchar *guid = g_hash_table_lookup(body, "Application-GUID"); 1150 const gchar *guid = g_hash_table_lookup(body, "Application-GUID");
1151 1151
1152 if (guid == NULL) { 1152 if (guid == NULL) {
1153 if (!strcmp(command, "CANCEL")) { 1153 purple_debug_warning("msn",
1154 const gchar *code = g_hash_table_lookup( 1154 "Invite msg missing Application-GUID.\n");
1155 body, "Cancel-Code");
1156 purple_debug_info("msn",
1157 "MSMSGS invitation cancelled: %s.\n",
1158 code ? code : "no reason given");
1159 } else
1160 purple_debug_warning("msn",
1161 "Invite msg missing Application-GUID.\n");
1162 1155
1163 accepted = TRUE; 1156 accepted = TRUE;
1164 1157
1165 } else if (!strcmp(guid, MSN_FT_GUID)) { 1158 } else if (!strcmp(guid, MSN_FT_GUID)) {
1166 1159
1214 1207
1215 msn_switchboard_send_msg(swboard, cancel, TRUE); 1208 msn_switchboard_send_msg(swboard, cancel, TRUE);
1216 msn_message_destroy(cancel); 1209 msn_message_destroy(cancel);
1217 } 1210 }
1218 1211
1212 } else if (!strcmp(command, "CANCEL")) {
1213 const gchar *code = g_hash_table_lookup(body, "Cancel-Code");
1214 purple_debug_info("msn", "MSMSGS invitation cancelled: %s.\n",
1215 code ? code : "no reason given");
1216
1219 } else { 1217 } else {
1220 /* 1218 /*
1221 * Some other already established invitation session. 1219 * Some other already established invitation session.
1222 * Can be retrieved by Invitation-Cookie. 1220 * Can be retrieved by Invitation-Cookie.
1223 */ 1221 */