gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20894 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r20894 - gnunet/src/fs
Date: Wed, 4 Apr 2012 13:24:44 +0200

Author: grothoff
Date: 2012-04-04 13:24:44 +0200 (Wed, 04 Apr 2012)
New Revision: 20894

Modified:
   gnunet/src/fs/Makefile.am
   gnunet/src/fs/fs_download.c
Log:
-allow NULL for emsg

Modified: gnunet/src/fs/Makefile.am
===================================================================
--- gnunet/src/fs/Makefile.am   2012-04-04 08:21:40 UTC (rev 20893)
+++ gnunet/src/fs/Makefile.am   2012-04-04 11:24:44 UTC (rev 20894)
@@ -226,7 +226,12 @@
  test_gnunet_fs_ns.py 
 endif
 
+if ENABLE_MONKEY
+ TESTS_ENVIRONMENT = @MONKEYPREFIX@
+ AM_LDFLAGS = -no-install
+endif
 
+
 if ENABLE_TEST_RUN
 TESTS = \
  test_fs_directory \

Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2012-04-04 08:21:40 UTC (rev 20893)
+++ gnunet/src/fs/fs_download.c 2012-04-04 11:24:44 UTC (rev 20894)
@@ -1773,16 +1773,19 @@
   struct GNUNET_DISK_FileHandle *fh = dc->rfh;
   ssize_t ret;
 
-  *emsg = NULL;
+  if (NULL != emsg)
+    *emsg = NULL;
   if (offset != GNUNET_DISK_file_seek (fh, offset, GNUNET_DISK_SEEK_SET))
   {
-    *emsg = GNUNET_strdup (strerror (errno));
+    if (NULL != emsg)
+      *emsg = GNUNET_strdup (strerror (errno));
     return 0;
   }
   ret = GNUNET_DISK_file_read (fh, buf, max);
   if (ret < 0)
   {
-    *emsg = GNUNET_strdup (strerror (errno));
+    if (NULL != emsg)
+      *emsg = GNUNET_strdup (strerror (errno));
     return 0;
   }
   return ret;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]