Mercurial > pidgin.yaz
comparison libpurple/protocols/mxit/login.c @ 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 | 2ec94166be43 |
children |
comparison
equal
deleted
inserted
replaced
32768:50cd80d3554e | 32769:d8c652ea476a |
---|---|
174 | 174 |
175 /* we now have an open and active TCP connection to the mxit server */ | 175 /* we now have an open and active TCP connection to the mxit server */ |
176 session->fd = source; | 176 session->fd = source; |
177 | 177 |
178 /* start listening on the open connection for messages from the server (reference: "libpurple/eventloop.h") */ | 178 /* start listening on the open connection for messages from the server (reference: "libpurple/eventloop.h") */ |
179 session->con->inpa = purple_input_add( session->fd, PURPLE_INPUT_READ, mxit_cb_rx, session ); | 179 session->inpa = purple_input_add( session->fd, PURPLE_INPUT_READ, mxit_cb_rx, session ); |
180 | 180 |
181 mxit_connected( session ); | 181 mxit_connected( session ); |
182 } | 182 } |
183 | 183 |
184 | 184 |
778 void mxit_reconnect( struct MXitSession* session ) | 778 void mxit_reconnect( struct MXitSession* session ) |
779 { | 779 { |
780 purple_debug_info( MXIT_PLUGIN_ID, "mxit_reconnect\n" ); | 780 purple_debug_info( MXIT_PLUGIN_ID, "mxit_reconnect\n" ); |
781 | 781 |
782 /* remove the input cb function */ | 782 /* remove the input cb function */ |
783 if ( session->con->inpa ) { | 783 if ( session->inpa ) { |
784 purple_input_remove( session->con->inpa ); | 784 purple_input_remove( session->inpa ); |
785 session->con->inpa = 0; | 785 session->inpa = 0; |
786 } | 786 } |
787 | 787 |
788 /* close existing connection */ | 788 /* close existing connection */ |
789 session->flags &= ~MXIT_FLAG_CONNECTED; | 789 session->flags &= ~MXIT_FLAG_CONNECTED; |
790 purple_proxy_connect_cancel_with_handle( session->con ); | 790 purple_proxy_connect_cancel_with_handle( session->con ); |