pidgin: fb8ddb29: IRC: Move the "inpa" input watcher into ...

andrew.victor at mxit.com andrew.victor at mxit.com
Tue Oct 18 17:57:15 EDT 2011


----------------------------------------------------------------------
Revision: fb8ddb29536b5b50a4d93e4ecf932bc0644d2f20
Parent:   9283c8f4097cabba74e3f5fb022cbac2b2f56b1d
Author:   andrew.victor at mxit.com
Date:     10/18/11 17:11:40
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/fb8ddb29536b5b50a4d93e4ecf932bc0644d2f20

Changelog: 

IRC: Move the "inpa" input watcher into protocol_data.


Changes against parent 9283c8f4097cabba74e3f5fb022cbac2b2f56b1d

  patched  libpurple/protocols/irc/irc.c
  patched  libpurple/protocols/irc/irc.h

-------------- next part --------------
============================================================
--- libpurple/protocols/irc/irc.c	c9585f7a660fa47cf51126640683b74d5ee64413
+++ libpurple/protocols/irc/irc.c	8ae06611592ef145d1f0bc5f2825d24fb7a76c2c
@@ -500,7 +500,7 @@ static void irc_login_cb(gpointer data, 
 	irc->fd = source;
 
 	if (do_login(gc)) {
-		gc->inpa = purple_input_add(irc->fd, PURPLE_INPUT_READ, irc_input_cb, gc);
+		irc->inpa = purple_input_add(irc->fd, PURPLE_INPUT_READ, irc_input_cb, gc);
 	}
 }
 
@@ -526,8 +526,10 @@ static void irc_close(PurpleConnection *
 	if (irc->gsc || (irc->fd >= 0))
 		irc_cmd_quit(irc, "quit", NULL, NULL);
 
-	if (gc->inpa)
-		purple_input_remove(gc->inpa);
+	if (irc->inpa) {
+		purple_input_remove(irc->inpa);
+		irc->inpa = 0;
+	}
 
 	g_free(irc->inbuf);
 	if (irc->gsc) {
============================================================
--- libpurple/protocols/irc/irc.h	898f5f8b0dda728c4f0465eb2edee4ee55ca519a
+++ libpurple/protocols/irc/irc.h	e95d79a54dcd38b9fd06251da503d473c6186bc6
@@ -54,6 +54,7 @@ struct irc_conn {
 	GHashTable *cmds;
 	char *server;
 	int fd;
+	guint inpa;
 	guint timer;
 	guint who_channel_timer;
 	GHashTable *buddies;


More information about the Commits mailing list