pidgin: 843fadc7: Decrement the ADL/FQY count when we rece..
qulogic at pidgin.im
qulogic at pidgin.im
Sat May 2 19:15:40 EDT 2009
-----------------------------------------------------------------
Revision: 843fadc72b6ceaff5a294621e71b36f8a002fdce
Ancestor: 5440ca529821d13803048bf7a1985cf02e4f8977
Author: qulogic at pidgin.im
Date: 2009-05-02T23:01:32
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/843fadc72b6ceaff5a294621e71b36f8a002fdce
Modified files:
libpurple/protocols/msn/notification.c
ChangeLog:
Decrement the ADL/FQY count when we receive an error about a FQY for a user
so that we can continue to login even with bogus email addresses.
References #8588.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/notification.c 328f5b50cc282fda66948c8dea96a9ac8cdd0261
+++ libpurple/protocols/msn/notification.c 7e812d54aaba864079f5ff6bcc2b5206c3f0ef3f
@@ -612,8 +612,19 @@ update_contact_network(MsnSession *sessi
static void
update_contact_network(MsnSession *session, const char *passport, MsnNetwork network)
{
- MsnUser *user = msn_userlist_find_user(session->userlist, passport);
+ MsnUser *user;
+
+ if (network == MSN_NETWORK_UNKNOWN)
+ {
+ purple_debug_warning("msn",
+ "Ignoring user %s about which server knows nothing.\n",
+ passport);
+ session->adl_fqy--;
+ return;
+ }
+
/* TODO: Also figure out how to update membership lists */
+ user = msn_userlist_find_user(session->userlist, passport);
if (user) {
xmlnode *adl_node;
char *payload;
@@ -914,26 +925,6 @@ static void
}
static void
-fqy_error_parse(MsnCmdProc *cmdproc, MsnCommand *cmd, char *payload, size_t len)
-{
- purple_debug_warning("msn", "FQY error %d: %s\n",
- GPOINTER_TO_INT(cmd->payload_cbdata), payload);
-}
-
-static void
-fqy_error(MsnCmdProc *cmdproc, MsnTransaction *trans, int error)
-{
- MsnCommand *cmd = cmdproc->last_cmd;
-
- purple_debug_error("msn", "FQY error %d\n", error);
- if (cmd->param_count > 1) {
- cmd->payload_cb = fqy_error_parse;
- cmd->payload_len = atoi(cmd->params[1]);
- cmd->payload_cbdata = GINT_TO_POINTER(error);
- }
-}
-
-static void
fqy_cmd_post(MsnCmdProc *cmdproc, MsnCommand *cmd, char *payload,
size_t len)
{
@@ -962,10 +953,10 @@ fqy_cmd_post(MsnCmdProc *cmdproc, MsnCom
passport = g_strdup_printf("%s@%s", local, domain);
- if (type != NULL)
+ if (!g_ascii_isdigit(cmd->command[0]) && type != NULL)
network = (MsnNetwork)strtoul(type, NULL, 10);
else
- network = MSN_NETWORK_PASSPORT;
+ network = MSN_NETWORK_UNKNOWN;
purple_debug_info("msn", "FQY response says %s is from network %d\n",
passport, network);
@@ -980,6 +971,26 @@ static void
}
static void
+fqy_error(MsnCmdProc *cmdproc, MsnTransaction *trans, int error)
+{
+ MsnCommand *cmd = cmdproc->last_cmd;
+
+ purple_debug_warning("msn", "FQY error %d\n", error);
+ if (cmd->param_count > 1) {
+ cmd->payload_cb = fqy_cmd_post;
+ cmd->payload_len = atoi(cmd->params[1]);
+ cmd->payload_cbdata = GINT_TO_POINTER(error);
+ }
+#if 0
+ /* If the server didn't send us a corresponding email address for this
+ FQY error, it's probably going to disconnect us. So it isn't necessary
+ to tell the handler about it. */
+ else if (trans->data)
+ ((MsnFqyCb)trans->data)(session, NULL, MSN_NETWORK_UNKNOWN); */
+#endif
+}
+
+static void
fqy_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
purple_debug_info("msn", "Process FQY\n");
More information about the Commits
mailing list