# HG changeset patch # User Sadrul Habib Chowdhury # Date 1187911248 0 # Node ID 35ae010cc037eb619479785806229f8399372510 # Parent 74f7d5e4a605e2392a4272c5a90ca2959f904f60 Input handlers are unsigned integers. So set them to 0 instead of -1 after removing it. diff -r 74f7d5e4a605 -r 35ae010cc037 libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Thu Aug 23 23:07:20 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Thu Aug 23 23:20:48 2007 +0000 @@ -2920,7 +2920,7 @@ purple_connection_set_display_name(gc, purple_account_get_username(account)); yd->fd = -1; - yd->txhandler = -1; + yd->txhandler = 0; /* TODO: Is there a good grow size for the buffer? */ yd->txbuf = purple_circ_buffer_new(0); yd->friends = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, yahoo_friend_free); diff -r 74f7d5e4a605 -r 35ae010cc037 libpurple/protocols/yahoo/yahoo_packet.c --- 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);