gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r10665 - gnunet/src/statistics


From: gnunet
Subject: [GNUnet-SVN] r10665 - gnunet/src/statistics
Date: Fri, 19 Mar 2010 14:21:31 +0100

Author: grothoff
Date: 2010-03-19 14:21:31 +0100 (Fri, 19 Mar 2010)
New Revision: 10665

Modified:
   gnunet/src/statistics/statistics_api.c
Log:
tolerate NULL handle

Modified: gnunet/src/statistics/statistics_api.c
===================================================================
--- gnunet/src/statistics/statistics_api.c      2010-03-19 12:44:06 UTC (rev 
10664)
+++ gnunet/src/statistics/statistics_api.c      2010-03-19 13:21:31 UTC (rev 
10665)
@@ -789,6 +789,8 @@
                        const char *name,
                        uint64_t value, int make_persistent)
 {
+  if (handle == NULL)
+    return;
   GNUNET_assert (GNUNET_NO == handle->do_destroy);
   add_setter_action (handle, name, make_persistent, value, ACTION_SET);
 }
@@ -808,6 +810,10 @@
                           const char *name,
                           int64_t delta, int make_persistent)
 {
+  if (handle == NULL)
+    return;
+  if (delta == 0)
+    return;
   GNUNET_assert (GNUNET_NO == handle->do_destroy);
   add_setter_action (handle, name, make_persistent,
                      (unsigned long long) delta, ACTION_UPDATE);





reply via email to

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