Mercurial > pidgin.yaz
diff libpurple/protocols/msn/notification.c @ 31139:c5a7516418c7
propagate from branch 'im.pidgin.pidgin' (head 624bba8bd37445c496620c94bfe6da7da8af2ee4)
to branch 'im.pidgin.cpw.qulogic.msnp16' (head 44494e162429137be1f175f40827c1d31655e7d3)
author | masca@cpw.pidgin.im |
---|---|
date | Thu, 18 Feb 2010 16:59:04 +0000 |
parents | 33b4ae796648 f549ad844d54 |
children | 4d7dfeae29c6 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c Tue Feb 16 15:58:34 2010 +0000 +++ b/libpurple/protocols/msn/notification.c Thu Feb 18 16:59:04 2010 +0000 @@ -369,81 +369,6 @@ msn_cmdproc_send_trans(cmdproc, trans); } -#if 0 -static void -ubm_cmd_post(MsnCmdProc *cmdproc, MsnCommand *cmd, char *payload, - size_t len) -{ - MsnMessage *msg; - PurpleConnection *gc; - const char *passport; - const char *content_type; - - purple_debug_info("msn", "Process UBM payload:%.*s\n", (guint)len, payload); - msg = msn_message_new_from_cmd(cmdproc->session, cmd); - - msn_message_parse_payload(msg, payload, len,MSG_LINE_DEM,MSG_BODY_DEM); - if (purple_debug_is_verbose()) - msn_message_show_readable(msg, "Notification", TRUE); - - gc = cmdproc->session->account->gc; - passport = msg->remote_user; - - content_type = msn_message_get_content_type(msg); - purple_debug_info("msn", "type:%s\n", content_type); - if(!strcmp(content_type,"text/plain")){ - const char *value; - const char *body; - char *body_enc; - char *body_final = NULL; - size_t body_len; - - body = msn_message_get_bin_data(msg, &body_len); - body_enc = g_markup_escape_text(body, body_len); - - if ((value = msn_message_get_header_value(msg, "X-MMS-IM-Format")) != NULL) { - char *pre, *post; - - msn_parse_format(value, &pre, &post); - body_final = g_strdup_printf("%s%s%s", pre ? pre : "", - body_enc ? body_enc : "", post ? post : ""); - g_free(pre); - g_free(post); - } - g_free(body_enc); - serv_got_im(gc, passport, body_final, 0, time(NULL)); - g_free(body_final); - } - if(!strcmp(content_type,"text/x-msmsgscontrol")){ - if(msn_message_get_header_value(msg, "TypingUser") != NULL){ - serv_got_typing(gc, passport, MSN_TYPING_RECV_TIMEOUT, - PURPLE_TYPING); - } - } - if(!strcmp(content_type,"text/x-msnmsgr-datacast")){ - char *username, *str; - PurpleAccount *account; - PurpleBuddy *buddy; - const char *user; - - account = cmdproc->session->account; - user = msg->remote_user; - - if ((buddy = purple_find_buddy(account, user)) != NULL){ - username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1); - }else{ - username = g_markup_escape_text(user, -1); - } - - str = g_strdup_printf(_("%s just sent you a Nudge!"), username); - g_free(username); - msn_session_report_user(cmdproc->session,user,str,PURPLE_MESSAGE_SYSTEM); - g_free(str); - } - msn_message_destroy(msg); -} -#endif - /*Yahoo msg process*/ static void ubm_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) @@ -1735,11 +1660,7 @@ * 6: Album * 7: ? */ -#if GLIB_CHECK_VERSION(2,6,0) strings = g_strv_length(cmedia_array); -#else - while (cmedia_array[++strings] != NULL); -#endif if (strings >= 4 && !strcmp(cmedia_array[2], "1")) { if (user->extinfo == NULL)