diff libpurple/protocols/yahoo/yahoo_packet.c @ 19393:35ae010cc037

Input handlers are unsigned integers. So set them to 0 instead of -1 after removing it.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 23 Aug 2007 23:20:48 +0000
parents b775a0bff96c
children 941965d6fd88
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo_packet.c	Thu Aug 23 23:07:20 2007 +0000
+++ b/libpurple/protocols/yahoo/yahoo_packet.c	Thu Aug 23 23:20:48 2007 +0000
@@ -294,7 +294,7 @@
 
 	if (writelen == 0) {
 		purple_input_remove(yd->txhandler);
-		yd->txhandler = -1;
+		yd->txhandler = 0;
 		return;
 	}
 
@@ -355,7 +355,7 @@
 	len = yahoo_packet_build(pkt, 0, yd->wm, yd->jp, &data);
 
 	yahoo_packet_dump(data, len);
-	if (yd->txhandler == -1)
+	if (yd->txhandler == 0)
 		ret = write(yd->fd, data, len);
 	else {
 		ret = -1;
@@ -371,7 +371,7 @@
 	}
 
 	if (ret < len) {
-		if (yd->txhandler == -1)
+		if (yd->txhandler == 0)
 			yd->txhandler = purple_input_add(yd->fd, PURPLE_INPUT_WRITE,
 				yahoo_packet_send_can_write, yd);
 		purple_circ_buffer_append(yd->txbuf, data + ret, len - ret);