--- a/libpurple/protocols/yahoo/yahoo_packet.c Wed Jun 12 10:20:03 2013 +0530 +++ b/libpurple/protocols/yahoo/yahoo_packet.c Wed Jun 12 18:58:24 2013 +0530 @@ -287,8 +287,9 @@ { YahooData *yd = data; int ret, writelen; + const gchar *output = NULL; - writelen = purple_circ_buffer_get_max_read(yd->txbuf); + writelen = purple_circular_buffer_get_max_read(yd->txbuf); if (writelen == 0) { purple_input_remove(yd->txhandler); @@ -296,7 +297,9 @@ return; } - ret = write(yd->fd, yd->txbuf->outptr, writelen); + output = purple_circular_buffer_get_output(yd->txbuf); + + ret = write(yd->fd, output, writelen); if (ret < 0 && errno == EAGAIN) return; @@ -307,7 +310,7 @@ return; } - purple_circ_buffer_mark_read(yd->txbuf, ret); + purple_circular_buffer_mark_read(yd->txbuf, ret); } @@ -374,7 +377,7 @@ 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); + purple_circular_buffer_append(yd->txbuf, data + ret, len - ret); } g_free(data);