changeset 22075:11eb52cb7525

Part of a large patch from o_sukhodolsky to fix some build warnings. Refs #1344
author Richard Laager <rlaager@wiktel.com>
date Sun, 13 Jan 2008 21:30:50 +0000
parents 50b20401ce45
children d60aa8fdad55
files libpurple/protocols/irc/dcc_send.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/irc/dcc_send.c	Sun Jan 13 21:24:59 2008 +0000
+++ b/libpurple/protocols/irc/dcc_send.c	Sun Jan 13 21:30:50 2008 +0000
@@ -51,9 +51,14 @@
  */
 static void irc_dccsend_recv_ack(PurpleXfer *xfer, const guchar *data, size_t size) {
 	unsigned long l;
+	size_t result;
 
 	l = htonl(xfer->bytes_sent);
-	write(xfer->fd, &l, sizeof(l));
+	result = write(xfer->fd, &l, sizeof(l));
+	if (result != sizeof(l)) {
+		purple_debug_error("irc", "unable to send acknowledgement: %s\n", strerror(errno));
+		/* TODO: We should probably close the connection here or something. */
+	}
 }
 
 static void irc_dccsend_recv_init(PurpleXfer *xfer) {