pidgin: ff568de9: Get rid of slplink->local_user because i...
markdoliner at pidgin.im
markdoliner at pidgin.im
Thu Nov 13 01:25:23 EST 2008
-----------------------------------------------------------------
Revision: ff568de985dc3486322fddce6ba614ad19c859e6
Ancestor: 6b1ddf5181d175d53d255fc96384ed8da3708aed
Author: markdoliner at pidgin.im
Date: 2008-11-13T06:18:53
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ff568de985dc3486322fddce6ba614ad19c859e6
Modified files:
libpurple/protocols/msn/slp.c
libpurple/protocols/msn/slplink.c
libpurple/protocols/msn/slplink.h
libpurple/protocols/msn/slpmsg.c
ChangeLog:
Get rid of slplink->local_user because it's a copy of
msn_user_get_passport(session->user), which is the same as account->username,
which is stupid
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slp.c 397d44a410f4d9299578913240c3c3d50958e5d7
+++ libpurple/protocols/msn/slp.c 0a7af5903c75748d994fb93795c7e5352457745c
@@ -385,6 +385,7 @@ send_bye(MsnSlpCall *slpcall, const char
send_bye(MsnSlpCall *slpcall, const char *type)
{
MsnSlpLink *slplink;
+ PurpleAccount *account;
MsnSlpMessage *slpmsg;
char *header;
@@ -392,8 +393,10 @@ send_bye(MsnSlpCall *slpcall, const char
g_return_if_fail(slplink != NULL);
+ account = slplink->session->account;
+
header = g_strdup_printf("BYE MSNMSGR:%s MSNSLP/1.0",
- slplink->local_user);
+ purple_account_get_username(account));
slpmsg = msn_slpmsg_sip_new(slpcall, 0, header,
"A0D624A6-6C0C-4283-A9E0-BC97B4B46D32",
@@ -841,6 +844,7 @@ msn_emoticon_msg(MsnCmdProc *cmdproc, Ms
sha1 = msn_object_get_sha1(obj);
slplink = msn_session_get_slplink(session, who);
+ g_assert(slplink->swboard != NULL);
slplink->swboard = swboard;
/* If the conversation doesn't exist then this is a custom smiley
============================================================
--- libpurple/protocols/msn/slplink.c 7a7f1b4936a759cad05f3714bbb9bf5204b381a6
+++ libpurple/protocols/msn/slplink.c 59ce0782d9c5484b2057532adf866c98d07b5268
@@ -74,7 +74,6 @@ msn_slplink_new(MsnSession *session, con
slplink->session = session;
slplink->slp_seq_id = rand() % 0xFFFFFF00 + 4;
- slplink->local_user = g_strdup(msn_user_get_passport(session->user));
slplink->remote_user = g_strdup(username);
slplink->slp_msg_queue = g_queue_new();
@@ -114,7 +113,6 @@ msn_slplink_destroy(MsnSlpLink *slplink)
session->slplinks =
g_list_remove(session->slplinks, slplink);
- g_free(slplink->local_user);
g_free(slplink->remote_user);
g_free(slplink);
============================================================
--- libpurple/protocols/msn/slplink.h fcecde2e58a77de36472a63717c0867b64e65f5f
+++ libpurple/protocols/msn/slplink.h 5dd16a752b1835e7ad6f8b9011c9b8cf9f6a2683
@@ -45,7 +45,6 @@ struct _MsnSlpLink
MsnSession *session;
MsnSwitchBoard *swboard;
- char *local_user;
char *remote_user;
int slp_seq_id;
============================================================
--- libpurple/protocols/msn/slpmsg.c c6df8f22882279a605c32eeb36908b6976647808
+++ libpurple/protocols/msn/slpmsg.c 4079fc69f7eed12ff341c63d8dc83548d820c63a
@@ -169,6 +169,7 @@ msn_slpmsg_sip_new(MsnSlpCall *slpcall,
const char *content_type, const char *content)
{
MsnSlpLink *slplink;
+ PurpleAccount *account;
MsnSlpMessage *slpmsg;
char *body;
gsize body_len;
@@ -178,6 +179,7 @@ msn_slpmsg_sip_new(MsnSlpCall *slpcall,
g_return_val_if_fail(header != NULL, NULL);
slplink = slpcall->slplink;
+ account = slplink->session->account;
/* Let's remember that "content" should end with a 0x00 */
@@ -196,7 +198,7 @@ msn_slpmsg_sip_new(MsnSlpCall *slpcall,
"\r\n",
header,
slplink->remote_user,
- slplink->local_user,
+ purple_account_get_username(account),
branch,
cseq,
slpcall->id,
More information about the Commits
mailing list