pidgin: f7a653e9: MXit: Move "inpa" input watcher from Pur...
andrew.victor at mxit.com
andrew.victor at mxit.com
Tue Oct 18 17:57:12 EDT 2011
----------------------------------------------------------------------
Revision: f7a653e938ca5b72f961885c81c3f1c0fdcc3115
Parent: 426940a0e723b61c64df76ed1c69f32a4b2c5864
Author: andrew.victor at mxit.com
Date: 10/18/11 16:58:39
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f7a653e938ca5b72f961885c81c3f1c0fdcc3115
Changelog:
MXit: Move "inpa" input watcher from PurpleConnection into PurpleConnection->proto_data.
Changes against parent 426940a0e723b61c64df76ed1c69f32a4b2c5864
patched libpurple/protocols/mxit/login.c
patched libpurple/protocols/mxit/mxit.h
patched libpurple/protocols/mxit/protocol.c
-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/login.c 6abe6ee1940cf02e506c0d154e2e9a2d1766e86d
+++ libpurple/protocols/mxit/login.c 666f156b2bb33e3e5164d9b156cd434a37617665
@@ -176,7 +176,7 @@ static void mxit_cb_connect( gpointer us
session->fd = source;
/* start listening on the open connection for messages from the server (reference: "libpurple/eventloop.h") */
- session->con->inpa = purple_input_add( session->fd, PURPLE_INPUT_READ, mxit_cb_rx, session );
+ session->inpa = purple_input_add( session->fd, PURPLE_INPUT_READ, mxit_cb_rx, session );
mxit_connected( session );
}
@@ -780,9 +780,9 @@ void mxit_reconnect( struct MXitSession*
purple_debug_info( MXIT_PLUGIN_ID, "mxit_reconnect\n" );
/* remove the input cb function */
- if ( session->con->inpa ) {
- purple_input_remove( session->con->inpa );
- session->con->inpa = 0;
+ if ( session->inpa ) {
+ purple_input_remove( session->inpa );
+ session->inpa = 0;
}
/* close existing connection */
============================================================
--- libpurple/protocols/mxit/mxit.h f1143fa501b957542f9e10ce262d1bc6280389b5
+++ libpurple/protocols/mxit/mxit.h eda518db53c4f3734935eb878def5fc5faec178b
@@ -161,6 +161,7 @@ struct MXitSession {
/* libpurple */
PurpleAccount* acc; /* pointer to the libpurple internal account struct */
PurpleConnection* con; /* pointer to the libpurple internal connection struct */
+ guint inpa; /* the input watcher */
/* transmit */
struct tx_queue queue; /* transmit packet queue (FIFO mode) */
============================================================
--- libpurple/protocols/mxit/protocol.c 545661e850cd8a1e7afabdf0638e19f587692a57
+++ libpurple/protocols/mxit/protocol.c 90526fa92ad9cad261086134464ff4d1b241a8b9
@@ -2819,9 +2819,9 @@ void mxit_close_connection( struct MXitS
}
/* remove the input cb function */
- if ( session->con->inpa ) {
- purple_input_remove( session->con->inpa );
- session->con->inpa = 0;
+ if ( session->inpa ) {
+ purple_input_remove( session->inpa );
+ session->inpa = 0;
}
/* remove HTTP poll timer */
More information about the Commits
mailing list