Mercurial > pidgin.yaz
diff libpurple/protocols/msn/slp.c @ 23558:cab5420c3879
merge of '5033650a1e57437cc3f2894adc41935daa6b3269'
and '95fe62719d362e8857a89e906a9008305e31dd5e'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Wed, 09 Jul 2008 00:32:18 +0000 |
parents | 1061a9ad1ddb 7fc1fa02184a |
children | 96e78c0fa32b |
line wrap: on
line diff
--- a/libpurple/protocols/msn/slp.c Wed Jul 09 00:27:44 2008 +0000 +++ b/libpurple/protocols/msn/slp.c Wed Jul 09 00:32:18 2008 +0000 @@ -251,7 +251,7 @@ got_sessionreq(MsnSlpCall *slpcall, const char *branch, const char *euf_guid, const char *context) { - if (!strcmp(euf_guid, "A4268EEC-FEC5-49E5-95C3-F126696BDBF6")) + if (!strcmp(euf_guid, MSN_OBJ_GUID)) { /* Emoticon or UserDisplay */ char *content; @@ -332,7 +332,7 @@ msn_slplink_queue_slpmsg(slplink, slpmsg); purple_imgstore_unref(img); } - else if (!strcmp(euf_guid, "5D3E02AB-6190-11D3-BBBB-00C04F795683")) + else if (!strcmp(euf_guid, MSN_FT_GUID)) { /* File Transfer */ PurpleAccount *account; @@ -384,7 +384,8 @@ purple_xfer_request(xfer); } - } + } else + purple_debug_warning("msn", "SLP SessionReq with unknown EUF-GUID: %s\n", euf_guid); } void @@ -781,16 +782,13 @@ got_emoticon(MsnSlpCall *slpcall, const guchar *data, gsize size) { - PurpleConversation *conv; - PurpleConnection *gc; - const char *who; + MsnSwitchBoard *swboard; - gc = slpcall->slplink->session->account->gc; - who = slpcall->slplink->remote_user; + swboard = slpcall->slplink->swboard; + conv = swboard->conv; - if ((conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, who, gc->account))) { - + if (conv) { /* FIXME: it would be better if we wrote the data as we received it instead of all at once, calling write multiple times and close once at the very end @@ -808,6 +806,7 @@ { MsnSession *session; MsnSlpLink *slplink; + MsnSwitchBoard *swboard; MsnObject *obj; char **tokens; char *smile, *body_str; @@ -847,8 +846,9 @@ slplink = msn_session_get_slplink(session, who); - conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, who, - session->account); + swboard = cmdproc->data; + slplink->swboard = swboard; + conv = swboard->conv; /* If the conversation doesn't exist then this is a custom smiley * used in the first message in a MSN conversation: we need to create