Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/oim.c @ 21100:29d8c86c14cd
propagate from branch 'im.pidgin.pidgin' (head cd2be742f6c45c200000003fc5a6341297bbe857)
to branch 'im.pidgin.cpw.khc.msnp14.soap' (head 1d7d51174ae87c7f03bb1290a8e447bf2a1704a5)
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Thu, 04 Oct 2007 06:13:01 +0000 |
parents | d52d299cfde3 48ee7ec3426d |
children | 741c3b5eac21 e64e6fbd1351 |
comparison
equal
deleted
inserted
replaced
20537:c49b886231d5 | 21100:29d8c86c14cd |
---|---|
118 static char * | 118 static char * |
119 msn_oim_msg_to_str(MsnOim *oim, const char *body) | 119 msn_oim_msg_to_str(MsnOim *oim, const char *body) |
120 { | 120 { |
121 char *oim_body,*oim_base64; | 121 char *oim_body,*oim_base64; |
122 | 122 |
123 purple_debug_info("MSNP14","encode OIM Message...\n"); | 123 purple_debug_info("MSN OIM","encode OIM Message...\n"); |
124 oim_base64 = purple_base64_encode((const guchar *)body, strlen(body)); | 124 oim_base64 = purple_base64_encode((const guchar *)body, strlen(body)); |
125 purple_debug_info("MSNP14","encoded base64 body:{%s}\n",oim_base64); | 125 purple_debug_info("MSN OIM","encoded base64 body:{%s}\n",oim_base64); |
126 oim_body = g_strdup_printf(MSN_OIM_MSG_TEMPLATE, | 126 oim_body = g_strdup_printf(MSN_OIM_MSG_TEMPLATE, |
127 oim->run_id,oim->send_seq,oim_base64); | 127 oim->run_id,oim->send_seq,oim_base64); |
128 | 128 |
129 return oim_body; | 129 return oim_body; |
130 } | 130 } |
397 start = strstr(passport_str,"<"); | 397 start = strstr(passport_str,"<"); |
398 start += 1; | 398 start += 1; |
399 end = strstr(passport_str,">"); | 399 end = strstr(passport_str,">"); |
400 passport = g_strndup(start,end - start); | 400 passport = g_strndup(start,end - start); |
401 g_free(passport_str); | 401 g_free(passport_str); |
402 purple_debug_info("MSNP14","oim Date:{%s},passport{%s}\n",date,passport); | 402 purple_debug_info("MSN OIM","oim Date:{%s},passport{%s}\n",date,passport); |
403 | 403 |
404 stamp = msn_oim_parse_timestamp(date); | 404 stamp = msn_oim_parse_timestamp(date); |
405 | 405 |
406 serv_got_im(rdata->oim->session->account->gc, passport, decode_msg, 0, | 406 serv_got_im(rdata->oim->session->account->gc, passport, decode_msg, 0, |
407 stamp); | 407 stamp); |
413 | 413 |
414 g_free(passport); | 414 g_free(passport); |
415 g_free(decode_msg); | 415 g_free(decode_msg); |
416 } | 416 } |
417 | 417 |
418 /* Parse the XML data, | |
419 * prepare to report the OIM to user | |
420 */ | |
418 static void | 421 static void |
419 msn_oim_get_read_cb(MsnSoapMessage *request, MsnSoapMessage *response, | 422 msn_oim_get_read_cb(MsnSoapMessage *request, MsnSoapMessage *response, |
420 gpointer data) | 423 gpointer data) |
421 { | 424 { |
422 MsnOimRecvData *rdata = data; | 425 MsnOimRecvData *rdata = data; |