| 22621:552a6fb4de03 | 22622:1ecb840b5101 |
|---|---|
| 344 } | 344 } |
| 345 | 345 |
| 346 int yahoo_packet_send(struct yahoo_packet *pkt, struct yahoo_data *yd) | 346 int yahoo_packet_send(struct yahoo_packet *pkt, struct yahoo_data *yd) |
| 347 { | 347 { |
| 348 size_t len; | 348 size_t len; |
| 349 int ret; | 349 ssize_t ret; |
| 350 guchar *data; | 350 guchar *data; |
| 351 | 351 |
| 352 if (yd->fd < 0) | 352 if (yd->fd < 0) |
| 353 return -1; | 353 return -1; |
| 354 | 354 |
| 363 } | 363 } |
| 364 | 364 |
| 365 if (ret < 0 && errno == EAGAIN) | 365 if (ret < 0 && errno == EAGAIN) |
| 366 ret = 0; | 366 ret = 0; |
| 367 else if (ret <= 0) { | 367 else if (ret <= 0) { |
| 368 purple_debug_warning("yahoo", "Only wrote %d of %d bytes!\n", ret, len); | 368 purple_debug_warning("yahoo", "Only wrote %" G_GSSIZE_FORMAT |
| 369 " of %" G_GSIZE_FORMAT " bytes!\n", ret, len); | |
| 369 g_free(data); | 370 g_free(data); |
| 370 return ret; | 371 return ret; |
| 371 } | 372 } |
| 372 | 373 |
| 373 if (ret < len) { | 374 if (ret < len) { |