im.pidgin.pidgin: d70a472b98887b5664f526b32c0631f3ca0d6fda

rlaager at pidgin.im rlaager at pidgin.im
Sun Jan 13 23:23:29 EST 2008


-----------------------------------------------------------------
Revision: d70a472b98887b5664f526b32c0631f3ca0d6fda
Ancestor: dbdb39b0de2b28e9a46681b14152bc0f25d96886
Author: rlaager at pidgin.im
Date: 2008-01-13T21:24:59
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/sametime/sametime.c

ChangeLog: 

Part of a large patch from o_sukhodolsky to fix some build warnings.
Refs #1344

-------------- next part --------------
============================================================
--- libpurple/protocols/sametime/sametime.c	1969dc294064a691dd92a7b18a6a99cd01eb4bc7
+++ libpurple/protocols/sametime/sametime.c	4852c37f073cfb87939f912c1a78464be4adc2df
@@ -2286,6 +2286,7 @@ static void mw_ft_recv(struct mwFileTran
 
   PurpleXfer *xfer;
   FILE *fp;
+  size_t wc;
 
   xfer = mwFileTransfer_getClientData(ft);
   g_return_if_fail(xfer != NULL);
@@ -2294,7 +2295,12 @@ static void mw_ft_recv(struct mwFileTran
   g_return_if_fail(fp != NULL);
 
   /* we must collect and save our precious data */
-  fwrite(data->data, 1, data->len, fp);
+  wc = fwrite(data->data, 1, data->len, fp);
+  if (wc != data->len) {
+    DEBUG_ERROR("failed to write data\n");
+    purple_xfer_cancel_local(xfer);
+    return;
+  }
 
   /* update the progress */
   xfer->bytes_sent += data->len;


More information about the Commits mailing list