comparison libpurple/protocols/msn/msn.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 7e69275a4eef 39737dfe1cca
children 741c3b5eac21
comparison
equal deleted inserted replaced
20537:c49b886231d5 21100:29d8c86c14cd
596 purple_notify_user_info_add_pair(user_info, _("Status"), tmp2); 596 purple_notify_user_info_add_pair(user_info, _("Status"), tmp2);
597 } 597 }
598 598
599 g_free(tmp2); 599 g_free(tmp2);
600 } else { 600 } else {
601 tmp = g_markup_escape_text(psm, -1); 601 if (psm != NULL && *psm) {
602 purple_notify_user_info_add_pair(user_info, _("Status"), tmp); 602 tmp = g_markup_escape_text(psm, -1);
603 g_free(tmp); 603 purple_notify_user_info_add_pair(user_info, _("Status"), tmp);
604 g_free(tmp);
605 }
604 } 606 }
605 607
606 if (currentmedia) { 608 if (currentmedia) {
607 tmp = g_markup_escape_text(currentmedia, -1); 609 tmp = g_markup_escape_text(currentmedia, -1);
608 purple_notify_user_info_add_pair(user_info, _("Current media"), tmp); 610 purple_notify_user_info_add_pair(user_info, _("Current media"), tmp);
1568 1570
1569 static char * 1571 static char *
1570 msn_info_strip_search_link(const char *field, size_t len) 1572 msn_info_strip_search_link(const char *field, size_t len)
1571 { 1573 {
1572 const char *c; 1574 const char *c;
1573 if ((c = strstr(field, " (http://spaces.live.com/default.aspx?page=searchresults")) == NULL && 1575 if ((c = strstr(field, " (http://")) == NULL)
1574 (c = strstr(field, " (http://spaces.msn.com/default.aspx?page=searchresults")) == NULL)
1575 return g_strndup(field, len); 1576 return g_strndup(field, len);
1576 return g_strndup(field, c - field); 1577 return g_strndup(field, c - field);
1577 } 1578 }
1578 1579
1579 static void 1580 static void