comparison libpurple/protocols/msn/msg.c @ 31534:a8cc50c2279f

Remove trailing whitespace
author Richard Laager <rlaager@wiktel.com>
date Tue, 04 Jan 2011 06:55:30 +0000
parents 05e05d96ba75
children 34da321b60f1
comparison
equal deleted inserted replaced
31533:44f53d3fc54f 31534:a8cc50c2279f
345 345
346 if (msg->msnslp_message) 346 if (msg->msnslp_message)
347 { 347 {
348 size_t siz; 348 size_t siz;
349 char *body; 349 char *body;
350 350
351 body = msn_slpmsgpart_serialize(msg->part, &siz); 351 body = msn_slpmsgpart_serialize(msg->part, &siz);
352 352
353 memcpy(n, body, siz); 353 memcpy(n, body, siz);
354 n += siz; 354 n += siz;
355 355
637 } 637 }
638 else 638 else
639 { 639 {
640 int i; 640 int i;
641 int bin_len; 641 int bin_len;
642 642
643 if (msg->part->footer->value == P2P_APPID_SESSION) 643 if (msg->part->footer->value == P2P_APPID_SESSION)
644 bin_len = P2P_PACKET_HEADER_SIZE; 644 bin_len = P2P_PACKET_HEADER_SIZE;
645 else 645 else
646 bin_len = body_len; 646 bin_len = body_len;
647 647
820 chat = TRUE; 820 chat = TRUE;
821 else 821 else
822 chat = FALSE; 822 chat = FALSE;
823 823
824 if (swboard->conv == NULL) { 824 if (swboard->conv == NULL) {
825 if (chat) 825 if (chat)
826 swboard->conv = purple_find_chat(account->gc, swboard->chat_id); 826 swboard->conv = purple_find_chat(account->gc, swboard->chat_id);
827 else { 827 else {
828 swboard->conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, 828 swboard->conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM,
829 who, account); 829 who, account);
830 if (swboard->conv == NULL) 830 if (swboard->conv == NULL)
843 g_free(str); 843 g_free(str);
844 844
845 } 845 }
846 846
847 /* TODO: Make these not be such duplicates of each other */ 847 /* TODO: Make these not be such duplicates of each other */
848 static void 848 static void
849 got_wink_cb(MsnSlpCall *slpcall, const guchar *data, gsize size) 849 got_wink_cb(MsnSlpCall *slpcall, const guchar *data, gsize size)
850 { 850 {
851 FILE *f = NULL; 851 FILE *f = NULL;
852 char *path = NULL; 852 char *path = NULL;
853 const char *who = slpcall->slplink->remote_user; 853 const char *who = slpcall->slplink->remote_user;
869 if (f) 869 if (f)
870 fclose(f); 870 fclose(f);
871 g_free(path); 871 g_free(path);
872 } 872 }
873 873
874 static void 874 static void
875 got_voiceclip_cb(MsnSlpCall *slpcall, const guchar *data, gsize size) 875 got_voiceclip_cb(MsnSlpCall *slpcall, const guchar *data, gsize size)
876 { 876 {
877 FILE *f = NULL; 877 FILE *f = NULL;
878 char *path = NULL; 878 char *path = NULL;
879 const char *who = slpcall->slplink->remote_user; 879 const char *who = slpcall->slplink->remote_user;
1131 if (body == NULL) { 1131 if (body == NULL) {
1132 purple_debug_warning("msn", 1132 purple_debug_warning("msn",
1133 "Unable to parse invite msg body.\n"); 1133 "Unable to parse invite msg body.\n");
1134 return; 1134 return;
1135 } 1135 }
1136 1136
1137 /* 1137 /*
1138 * GUID is NOT always present but Invitation-Command and Invitation-Cookie 1138 * GUID is NOT always present but Invitation-Command and Invitation-Cookie
1139 * are mandatory. 1139 * are mandatory.
1140 */ 1140 */
1141 command = g_hash_table_lookup(body, "Invitation-Command"); 1141 command = g_hash_table_lookup(body, "Invitation-Command");
1148 ); 1148 );
1149 return; 1149 return;
1150 1150
1151 } else if (!strcmp(command, "INVITE")) { 1151 } else if (!strcmp(command, "INVITE")) {
1152 const gchar *guid = g_hash_table_lookup(body, "Application-GUID"); 1152 const gchar *guid = g_hash_table_lookup(body, "Application-GUID");
1153 1153
1154 if (guid == NULL) { 1154 if (guid == NULL) {
1155 purple_debug_warning("msn", 1155 purple_debug_warning("msn",
1156 "Invite msg missing Application-GUID.\n"); 1156 "Invite msg missing Application-GUID.\n");
1157 1157
1158 accepted = TRUE; 1158 accepted = TRUE;
1187 } else { 1187 } else {
1188 const gchar *application = g_hash_table_lookup(body, "Application-Name"); 1188 const gchar *application = g_hash_table_lookup(body, "Application-Name");
1189 purple_debug_warning("msn", "Unhandled invite msg with GUID %s: %s.\n", 1189 purple_debug_warning("msn", "Unhandled invite msg with GUID %s: %s.\n",
1190 guid, application ? application : "(null)"); 1190 guid, application ? application : "(null)");
1191 } 1191 }
1192 1192
1193 if (!accepted) { 1193 if (!accepted) {
1194 MsnSwitchBoard *swboard = cmdproc->data; 1194 MsnSwitchBoard *swboard = cmdproc->data;
1195 char *text; 1195 char *text;
1196 MsnMessage *cancel; 1196 MsnMessage *cancel;
1197 1197