comparison libpurple/protocols/msn/state.c @ 20439:bee467c81570

A bunch of MSNP14 stuff: Don't store the group id on the group blist node. Fix & tidy up payload length detection for commands (errors can have payloads too) Avoid a crash when connecting to a new account with no contact list Tidy up addressbook parsing slightly Fix crashes when buddy list sync issues are detected Fix initial email notifications, Fixes #1293 Plug a few memory leaks Detect OIM authentication failures correctly NOTE: I have disabled dynamic address book retrieval, instead we now receive the whole address book. This is because the blist sync stuff is still very wonky.
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 27 May 2007 17:00:06 +0000
parents 5048651671e1
children 530a92d50c5e
comparison
equal deleted inserted replaced
20438:0d67ac110e2b 20439:bee467c81570
87 { 87 {
88 char **cmedia_array; 88 char **cmedia_array;
89 char *buffer=NULL, *inptr, *outptr, *tmpptr; 89 char *buffer=NULL, *inptr, *outptr, *tmpptr;
90 int length, strings, tmp; 90 int length, strings, tmp;
91 91
92 if((cmedia == NULL) || (*cmedia == '\0')) {
93 purple_debug_info("msn", "No currentmedia string\n");
94 return NULL;
95 }
96
92 purple_debug_info("msn", "Parsing currentmedia string: \"%s\"\n", cmedia); 97 purple_debug_info("msn", "Parsing currentmedia string: \"%s\"\n", cmedia);
93 if( (cmedia == NULL) || (!strcmp(cmedia, ""))) {
94 purple_debug_info("msn", "No currentmedia string\n");
95 return NULL;
96 }
97 98
98 cmedia_array=g_strsplit(cmedia, "\\0", 0); 99 cmedia_array=g_strsplit(cmedia, "\\0", 0);
99 100
100 strings=1; /* Skip first empty string */ 101 strings=1; /* Skip first empty string */
101 length=5; /* Space for '\0' (1 byte) and prefix (4 bytes) */ 102 length=5; /* Space for '\0' (1 byte) and prefix (4 bytes) */
229 } 230 }
230 /*Get the PSM string from Purple's Status Line*/ 231 /*Get the PSM string from Purple's Status Line*/
231 presence = purple_account_get_presence(account); 232 presence = purple_account_get_presence(account);
232 status = purple_presence_get_active_status(presence); 233 status = purple_presence_get_active_status(presence);
233 statusline = purple_status_get_attr_string(status, "message"); 234 statusline = purple_status_get_attr_string(status, "message");
234 session ->psm = msn_build_psm(statusline, NULL, NULL); 235 session->psm = msn_build_psm(statusline, NULL, NULL);
235 payload = session->psm; 236 payload = session->psm;
236 237
237 purple_debug_info("MaYuan","UUX{%s}\n",payload); 238 purple_debug_info("MaYuan","UUX{%s}\n",payload);
238 trans = msn_transaction_new(cmdproc, "UUX","%d",strlen(payload)); 239 trans = msn_transaction_new(cmdproc, "UUX","%d",strlen(payload));
239 msn_transaction_set_payload(trans, payload, strlen(payload)); 240 msn_transaction_set_payload(trans, payload, strlen(payload));