Mercurial > pidgin.yaz
changeset 32769:d8c652ea476a
MXit: Move "inpa" input watcher from PurpleConnection into PurpleConnection->proto_data.
author | andrew.victor@mxit.com |
---|---|
date | Tue, 18 Oct 2011 20:58:39 +0000 |
parents | 50cd80d3554e |
children | a5f50581b7c0 |
files | libpurple/protocols/mxit/login.c libpurple/protocols/mxit/mxit.h libpurple/protocols/mxit/protocol.c |
diffstat | 3 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/mxit/login.c Tue Oct 18 20:25:41 2011 +0000 +++ b/libpurple/protocols/mxit/login.c Tue Oct 18 20:58:39 2011 +0000 @@ -176,7 +176,7 @@ 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 @@ 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 */
--- a/libpurple/protocols/mxit/mxit.h Tue Oct 18 20:25:41 2011 +0000 +++ b/libpurple/protocols/mxit/mxit.h Tue Oct 18 20:58:39 2011 +0000 @@ -161,6 +161,7 @@ /* 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) */
--- a/libpurple/protocols/mxit/protocol.c Tue Oct 18 20:25:41 2011 +0000 +++ b/libpurple/protocols/mxit/protocol.c Tue Oct 18 20:58:39 2011 +0000 @@ -2819,9 +2819,9 @@ } /* 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 */