pidgin: b3d59f69: Samtime: Move the "inpa" input watcher i...
andrew.victor at mxit.com
andrew.victor at mxit.com
Tue Oct 18 17:57:02 EDT 2011
----------------------------------------------------------------------
Revision: b3d59f69fba3828d9167e5ebc1b3e8870ec2be39
Parent: fb8ddb29536b5b50a4d93e4ecf932bc0644d2f20
Author: andrew.victor at mxit.com
Date: 10/18/11 17:17:08
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b3d59f69fba3828d9167e5ebc1b3e8870ec2be39
Changelog:
Samtime: Move the "inpa" input watcher into protocol_data.
Changes against parent fb8ddb29536b5b50a4d93e4ecf932bc0644d2f20
patched libpurple/connection.h
patched libpurple/protocols/sametime/sametime.c
patched libpurple/protocols/silc/silc.c
patched libpurple/protocols/silc/util.c
-------------- next part --------------
============================================================
--- libpurple/connection.h d10f6b27a87b234ebd2aede96e4ff5ac7d0b62ab
+++ libpurple/connection.h f2d585ea9d665938ed7054c2c58313054e9a2116
@@ -235,7 +235,7 @@ struct _PurpleConnection
PurpleAccount *account; /**< The account being connected to. */
char *password; /**< The password used. */
- int inpa; /**< The input watcher. */
+ int inpa_; /**< The input watcher. */
GSList *buddy_chats; /**< A list of active chats
(#PurpleConversation structs of type
============================================================
--- libpurple/protocols/silc/silc.c b233f2caf5e9b676eba0503c067ec0a5aab947e8
+++ libpurple/protocols/silc/silc.c ac98605ca1f26b42d3cca1b0b9cbfbb5cb99e3ed
@@ -528,7 +528,7 @@ static void silcpurple_running(SilcClien
g_snprintf(prd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "private_key.prv", silcpurple_silcdir());
if (!silc_load_key_pair((char *)purple_account_get_string(account, "public-key", pkd),
(char *)purple_account_get_string(account, "private-key", prd),
- (gc->password == NULL) ? "" : gc->password,
+ (purple_connection_get_password(gc) == NULL) ? "" : purple_connection_get_password(gc),
&sg->public_key, &sg->private_key)) {
if (!purple_account_get_password(account)) {
purple_account_request_password(account, G_CALLBACK(silcpurple_got_password_cb),
============================================================
--- libpurple/protocols/silc/util.c f75c9de61ff9240d1c510ec3a815a5d407951e14
+++ libpurple/protocols/silc/util.c 1999cd429db593341dc76cfba20ef68062d12d29
@@ -210,8 +210,7 @@ gboolean silcpurple_check_silc_dir(Purpl
SILCPURPLE_DEF_PKCS_LEN,
file_public_key,
file_private_key, NULL,
- (gc->password == NULL)
- ? "" : gc->password,
+ (purple_connection_get_password(gc) == NULL) ? "" : purple_connection_get_password(gc),
NULL, NULL, FALSE)) {
purple_connection_error(gc, PURPLE_CONNECTION_ERROR_OTHER_ERROR,
_("Unable to create SILC key pair"));
@@ -253,8 +252,7 @@ gboolean silcpurple_check_silc_dir(Purpl
SILCPURPLE_DEF_PKCS_LEN,
file_public_key,
file_private_key, NULL,
- (gc->password == NULL)
- ? "" : gc->password,
+ (purple_connection_get_password(gc) == NULL) ? "" : purple_connection_get_password(gc),
NULL, NULL, FALSE)) {
purple_connection_error(gc, PURPLE_CONNECTION_ERROR_OTHER_ERROR,
_("Unable to create SILC key pair"));
============================================================
--- libpurple/protocols/sametime/sametime.c 01b88f1ea6d2acdc09affd957c78da5cb553dcc3
+++ libpurple/protocols/sametime/sametime.c 45ec2ffd890f1cbd5d6d2e4a7e3dd81dff785679
@@ -217,6 +217,7 @@ struct mwPurplePluginData {
/** socket fd */
int socket;
+ guint inpa; /* input watcher */
gint outpa; /* like inpa, but the other way */
/** circular buffer for outgoing data */
@@ -449,9 +450,9 @@ static void mw_session_io_close(struct m
pd->socket = 0;
}
- if(gc->inpa) {
- purple_input_remove(gc->inpa);
- gc->inpa = 0;
+ if(pd->inpa) {
+ purple_input_remove(pd->inpa);
+ pd->inpa = 0;
}
}
@@ -1760,9 +1761,9 @@ static void read_cb(gpointer data, gint
pd->socket = 0;
}
- if(pd->gc->inpa) {
- purple_input_remove(pd->gc->inpa);
- pd->gc->inpa = 0;
+ if(pd->inpa) {
+ purple_input_remove(pd->inpa);
+ pd->inpa = 0;
}
if(! ret) {
@@ -1791,7 +1792,6 @@ static void connect_cb(gpointer data, gi
static void connect_cb(gpointer data, gint source, const gchar *error_message) {
struct mwPurplePluginData *pd = data;
- PurpleConnection *gc = pd->gc;
if(source < 0) {
/* connection failed */
@@ -1819,7 +1819,7 @@ static void connect_cb(gpointer data, gi
}
pd->socket = source;
- gc->inpa = purple_input_add(source, PURPLE_INPUT_READ,
+ pd->inpa = purple_input_add(source, PURPLE_INPUT_READ,
read_cb, pd);
mwSession_start(pd->session);
@@ -3794,9 +3794,9 @@ static void mw_prpl_close(PurpleConnecti
purple_connection_set_protocol_data(gc, NULL);
/* stop watching the socket */
- if(gc->inpa) {
- purple_input_remove(gc->inpa);
- gc->inpa = 0;
+ if(pd->inpa) {
+ purple_input_remove(pd->inpa);
+ pd->inpa = 0;
}
/* clean up the rest */
More information about the Commits
mailing list