pidgin: efbc57de: Replace the mpop account setting with a ...
qulogic at pidgin.im
qulogic at pidgin.im
Sun Dec 5 04:13:21 EST 2010
----------------------------------------------------------------------
Revision: efbc57de2e1fe5b417e4b3243860f06b4471dfb3
Parent: 65538ec661afd2eb4ddcb91d43a8b3caaf4cc199
Author: qulogic at pidgin.im
Date: 12/05/10 03:13:13
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/efbc57de2e1fe5b417e4b3243860f06b4471dfb3
Changelog:
Replace the mpop account setting with a session boolean, because I
can't get a good signal for when the user changes an account setting.
Changes against parent 65538ec661afd2eb4ddcb91d43a8b3caaf4cc199
patched libpurple/protocols/msn/contact.c
patched libpurple/protocols/msn/msn.c
patched libpurple/protocols/msn/notification.c
patched libpurple/protocols/msn/session.c
patched libpurple/protocols/msn/session.h
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c 40175280d4403feb789de2b167360465082f226a
+++ libpurple/protocols/msn/msn.c 0533a53c03498b4b19388c0110f19e5ed420ff69
@@ -1173,8 +1173,7 @@ msn_actions(PurplePlugin *plugin, gpoint
m = g_list_append(m, act);
m = g_list_append(m, NULL);
- if (purple_account_get_bool(session->account, "mpop", TRUE)
- && session->protocol_ver >= 16)
+ if (session->enable_mpop && session->protocol_ver >= 16)
{
act = purple_plugin_action_new(_("View Locations..."),
msn_show_locations);
============================================================
--- libpurple/protocols/msn/notification.c abc1471b0dddbc60628b5aa49b23a13f2a96f9a8
+++ libpurple/protocols/msn/notification.c 53fdf5c52432f2abd21b41788f8e999e5a6f9ad4
@@ -1572,7 +1572,7 @@ parse_user_endpoints(MsnUser *user, xmln
/* Disconnect others, if MPOP is disabled */
if (is_me
- && !purple_account_get_bool(session->account, "mpop", TRUE)
+ && !session->enable_mpop
&& strncasecmp(id + 1, session->guid, 36) != 0) {
purple_debug_info("msn", "Disconnecting Endpoint %s\n", id);
@@ -1599,7 +1599,7 @@ parse_user_endpoints(MsnUser *user, xmln
}
}
- if (is_me && purple_account_get_bool(session->account, "mpop", TRUE)) {
+ if (is_me && session->enable_mpop) {
for (epNode = xmlnode_get_child(payloadNode, "PrivateEndpointData");
epNode;
epNode = xmlnode_get_next_twin(epNode)) {
============================================================
--- libpurple/protocols/msn/session.c f21ffa937790de366180459758a4a245615dc5a5
+++ libpurple/protocols/msn/session.c 0397ae403a9ad8676a6935ca5c633dd7461d5051
@@ -49,6 +49,7 @@ msn_session_new(PurpleAccount *account)
session->oim = msn_oim_new(session);
session->protocol_ver = 0;
+ session->enable_mpop = TRUE; /* Default only */
session->guid = rand_guid();
============================================================
--- libpurple/protocols/msn/session.h 8bcb98cf4a2c727e1094c4a0062ac59dabef3719
+++ libpurple/protocols/msn/session.h 6e719311c6e2f16f9bbb7f2d3852af428d6babeb
@@ -83,6 +83,7 @@ struct _MsnSession
gboolean logged_in:1; /**< A temporal flag to ignore local buddy list adds. */
gboolean destroying:1; /**< A flag that states if the session is being destroyed. */
gboolean http_method:1;
+ gboolean enable_mpop:1; /**< Use Multiple Points of Presence? */
int adl_fqy; /**< A count of ADL/FQY so status is only changed once. */
guint login_timeout; /**< Timeout to force status change if ADL/FQY fail. */
============================================================
--- libpurple/protocols/msn/contact.c 059404b457329418323fec8a29f5dd11f029822c
+++ libpurple/protocols/msn/contact.c f0a5014b8df87e4a3a96d896cd1e3a8561e0e27a
@@ -732,9 +732,9 @@ msn_parse_addressbook_contacts(MsnSessio
value = xmlnode_get_data(xmlnode_get_child(annotation, "Value"));
if (!strcmp(name, "MSN.IM.MPOP")) {
if (!value || atoi(value) != 0)
- purple_account_set_bool(session->account, "mpop", TRUE);
+ session->enable_mpop = TRUE;
else
- purple_account_set_bool(session->account, "mpop", FALSE);
+ session->enable_mpop = FALSE;
}
g_free(name);
g_free(value);
More information about the Commits
mailing list