im.pidgin.pidgin.2.3.1: edce9175fc68ada5f18977556968f56472bfd0d6
kstange at pidgin.im
kstange at pidgin.im
Tue Dec 4 01:39:11 EST 2007
-----------------------------------------------------------------
Revision: edce9175fc68ada5f18977556968f56472bfd0d6
Ancestor: 7b740e502dd52f85f7db1956c29ba85f7fde8f84
Author: kstange at pidgin.im
Date: 2007-12-04T06:22:30
Branch: im.pidgin.pidgin.2.3.1
Modified files:
libpurple/protocols/myspace/myspace.c
libpurple/protocols/myspace/session.c
libpurple/protocols/myspace/session.h
ChangeLog:
applied changes from 6546cfd72ecd9aa76fc524aaf3ac48489aeb2a90
through 65fe5060e09daeac78c60bf74d157d7c2330ea74
applied changes from 65fe5060e09daeac78c60bf74d157d7c2330ea74
through fff669d4c52e1922e85347abbca84430b29359d9
-------------- next part --------------
============================================================
--- libpurple/protocols/myspace/myspace.c e3ca8584f367127ce0ad10203e8117f475173e0f
+++ libpurple/protocols/myspace/myspace.c ebf2bd85b71b634966f698b4d7bfc5bd50e688e2
@@ -1369,8 +1369,10 @@ msim_check_inbox_cb(MsimSession *session
msim_msg_dump("msim_check_inbox_cb: reply=%s\n", reply);
body = msim_msg_get_dictionary(reply, "body");
- g_return_if_fail(body != NULL);
+ if (body == NULL)
+ return;
+
old_inbox_status = session->inbox_status;
n = 0;
@@ -1433,6 +1435,11 @@ msim_check_inbox(gpointer data)
session = (MsimSession *)data;
+ if (!MSIM_SESSION_VALID(session)) {
+ purple_debug_info("msim", "msim_check_inbox: session invalid, stopping the mail check.\n");
+ return FALSE;
+ }
+
purple_debug_info("msim", "msim_check_inbox: checking mail\n");
g_return_val_if_fail(msim_send(session,
"persist", MSIM_TYPE_INTEGER, 1,
@@ -1645,7 +1652,7 @@ msim_we_are_logged_on(MsimSession *sessi
/* Check mail if they want to. */
if (purple_account_get_check_mail(session->account)) {
- purple_timeout_add(MSIM_MAIL_INTERVAL_CHECK,
+ session->inbox_handle = purple_timeout_add(MSIM_MAIL_INTERVAL_CHECK,
(GSourceFunc)msim_check_inbox, session);
msim_check_inbox(session);
}
@@ -1947,8 +1954,8 @@ msim_incoming_status(MsimSession *sessio
break;
case MSIM_STATUS_CODE_IDLE:
- /* will be handled below */
- purple_status_code = -1;
+ /* Treat idle as an available status. */
+ purple_status_code = PURPLE_STATUS_AVAILABLE;
break;
default:
============================================================
--- libpurple/protocols/myspace/session.c 00abcaf2a146a77b554f2dd45933de471841442e
+++ libpurple/protocols/myspace/session.c f120bf5c109b9f70507918c7f4f92285c4528a71
@@ -63,6 +63,7 @@ msim_session_new(PurpleAccount *acct)
session->next_rid = 1;
session->last_comm = time(NULL);
session->inbox_status = 0;
+ session->inbox_handle = 0;
return session;
}
@@ -90,6 +91,11 @@ msim_session_destroy(MsimSession *sessio
msim_msg_free(session->server_info);
}
+ /* Stop checking the inbox at the end of the session. */
+ if (session->inbox_handle) {
+ purple_timeout_remove(session->inbox_handle);
+ }
+
g_free(session);
}
============================================================
--- libpurple/protocols/myspace/session.h 44f91f9124a7c5463a541d5af2d3465bc291e926
+++ libpurple/protocols/myspace/session.h b03eaaf8edc2bed3f95c57cf46776e4910ab14b3
@@ -45,6 +45,7 @@ typedef struct _MsimSession
guint next_rid; /**< Next request/response ID */
time_t last_comm; /**< Time received last communication */
guint inbox_status; /**< Bit field of inbox notifications */
+ guint inbox_handle; /**< The handle for the mail check timer */
} MsimSession;
/* Check if an MsimSession is valid */
More information about the Commits
mailing list