pidgin: db45046d: Jabber: Move the "inpa" input watcher in...
andrew.victor at mxit.com
andrew.victor at mxit.com
Tue Oct 18 17:57:05 EDT 2011
----------------------------------------------------------------------
Revision: db45046d172043350f30bcf66e23ff73d7061be5
Parent: b3d59f69fba3828d9167e5ebc1b3e8870ec2be39
Author: andrew.victor at mxit.com
Date: 10/18/11 17:20:56
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/db45046d172043350f30bcf66e23ff73d7061be5
Changelog:
Jabber: Move the "inpa" input watcher into protocol_data.
Changes against parent b3d59f69fba3828d9167e5ebc1b3e8870ec2be39
patched libpurple/protocols/jabber/jabber.c
patched libpurple/protocols/jabber/jabber.h
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c 33afa6391b6eec4988130f0ccbce7a283972d64b
+++ libpurple/protocols/jabber/jabber.c 10e566e21daec0feac82260fecf2dac28a2b5e4c
@@ -829,7 +829,7 @@ jabber_login_callback(gpointer data, gin
jabber_send_raw(js, "<?xml version='1.0' ?>", -1);
jabber_stream_set_state(js, JABBER_STREAM_INITIALIZING);
- gc->inpa = purple_input_add(js->fd, PURPLE_INPUT_READ, jabber_recv_cb, gc);
+ js->inpa = purple_input_add(js->fd, PURPLE_INPUT_READ, jabber_recv_cb, gc);
}
static void
@@ -850,8 +850,8 @@ static void tls_init(JabberStream *js)
static void tls_init(JabberStream *js)
{
- purple_input_remove(js->gc->inpa);
- js->gc->inpa = 0;
+ purple_input_remove(js->inpa);
+ js->inpa = 0;
js->gsc = purple_ssl_connect_with_host_fd(purple_connection_get_account(js->gc), js->fd,
jabber_login_callback_ssl, jabber_ssl_connect_failure, js->certificate_CN, js->gc);
/* The fd is no longer our concern */
@@ -1603,8 +1603,10 @@ void jabber_close(PurpleConnection *gc)
if(js->gsc) {
purple_ssl_close(js->gsc);
} else if (js->fd > 0) {
- if(js->gc->inpa)
- purple_input_remove(js->gc->inpa);
+ if(js->inpa) {
+ purple_input_remove(js->inpa);
+ js->inpa = 0;
+ }
close(js->fd);
}
============================================================
--- libpurple/protocols/jabber/jabber.h 4886d45526932fb189a96ac9ce60e4268952b8de
+++ libpurple/protocols/jabber/jabber.h 452f6ce82096071496c24639ffa4a7f41c0964bc
@@ -99,6 +99,7 @@ struct _JabberStream
struct _JabberStream
{
int fd;
+ guint inpa;
PurpleSrvTxtQueryData *srv_query_data;
More information about the Commits
mailing list