From: Mark D. <the...@us...> - 2003-12-09 01:55:19
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory sc8-pr-cvs1:/tmp/cvs-serv20529/src/protocols/msn Modified Files: notification.c Log Message: Email parsing changes from Felipe Contreras (revo): Currently only MSN send email notifications with MIME fields, so, only decode MIME fields in MSN. This makes me feel warm. Index: notification.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/notification.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -p -r1.77 -r1.78 --- notification.c 2 Dec 2003 14:25:55 -0000 1.77 +++ notification.c 9 Dec 2003 01:55:15 -0000 1.78 @@ -2053,7 +2053,7 @@ email_msg(MsnServConn *servconn, MsnMess MsnSession *session = servconn->session; GaimConnection *gc = session->account->gc; GHashTable *table; - const char *from, *subject; + char *from, *subject; if (strcmp(servconn->msg_passport, "Hotmail")) { /* This isn't an official message. */ @@ -2073,11 +2073,14 @@ email_msg(MsnServConn *servconn, MsnMess table = msn_message_get_hashtable_from_body(msg); - from = g_hash_table_lookup(table, "From"); - subject = g_hash_table_lookup(table, "Subject"); + from = gaim_mime_decode_field(g_hash_table_lookup(table, "From")); + subject = gaim_mime_decode_field(g_hash_table_lookup(table, "Subject")); gaim_notify_email(gc, subject, from, msn_user_get_passport(session->user), session->passport_info.file, NULL, NULL); + + g_free(from); + g_free(subject); g_hash_table_destroy(table); |