soc.2010.msn-tlc: 9833702e: Manage sending messages trough switchboa...
masca at cpw.pidgin.im
masca at cpw.pidgin.im
Wed Jun 16 19:16:11 EDT 2010
-----------------------------------------------------------------
Revision: 9833702ef48cab7ac01356e052d78c9f0f01ae83
Ancestor: 482b14391e896022cbd7f8150ac4423ab1b4317d
Author: masca at cpw.pidgin.im
Date: 2010-06-15T21:21:24
Branch: im.pidgin.soc.2010.msn-tlc
URL: http://d.pidgin.im/viewmtn/revision/info/9833702ef48cab7ac01356e052d78c9f0f01ae83
Modified files:
libpurple/protocols/msn/sbconn.c
libpurple/protocols/msn/sbconn.h
libpurple/protocols/msn/slplink.c
ChangeLog:
Manage sending messages trough switchboard in sbconn.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/sbconn.c 1dfe9a263dec74d50117d63a08dcc10450f8ec05
+++ libpurple/protocols/msn/sbconn.c 41f3ea6b941d6dd4eaf8a80671d3e3c6053cbeab
@@ -59,3 +59,18 @@ msn_sbconn_msg_nak(MsnMessage *msg, void
msn_message_unref(msg);
}
+void msn_sbconn_send_msg(MsnSlpLink *slplink, MsnMessage *msg)
+{
+ if (slplink->swboard == NULL)
+ {
+ slplink->swboard = msn_session_get_swboard(slplink->session,
+ slplink->remote_user, MSN_SB_FLAG_FT);
+
+ g_return_if_fail(slplink->swboard != NULL);
+
+ /* If swboard is destroyed we will be too */
+ slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink);
+ }
+
+ msn_switchboard_send_msg(slplink->swboard, msg, TRUE);
+}
============================================================
--- libpurple/protocols/msn/sbconn.h 14610611c08cd31033babab9f077b3a59179a023
+++ libpurple/protocols/msn/sbconn.h 4095835a2d125f29ce57b3c7d25d14d5f3926ded
@@ -2,10 +2,14 @@
#define MSN_SBCONN_H
#include "msg.h"
+#include "slplink.h"
#define MSN_SBCONN_MAX_SIZE 1202
void msn_sbconn_msg_ack(MsnMessage *msg, void *data);
void msn_sbconn_msg_nak(MsnMessage *msg, void *data);
+
+void msn_sbconn_send_msg(MsnSlpLink *slplink, MsnMessage *msg);
+
#endif /* MSN_SBCONN_H */
============================================================
--- libpurple/protocols/msn/slplink.c a3df971cf7ea2e35d82d29113caae165f8faf59b
+++ libpurple/protocols/msn/slplink.c 433a6308d6f560df6a60b53116ddacb1221fe050
@@ -274,18 +274,7 @@ msn_slplink_send_msg(MsnSlpLink *slplink
}
else
{
- if (slplink->swboard == NULL)
- {
- slplink->swboard = msn_session_get_swboard(slplink->session,
- slplink->remote_user, MSN_SB_FLAG_FT);
-
- g_return_if_fail(slplink->swboard != NULL);
-
- /* If swboard is destroyed we will be too */
- slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink);
- }
-
- msn_switchboard_send_msg(slplink->swboard, msg, TRUE);
+ msn_sbconn_send_msg(slplink, msg);
}
}
More information about the Commits
mailing list