gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r7474 - GNUnet/src/util/error


From: gnunet
Subject: [GNUnet-SVN] r7474 - GNUnet/src/util/error
Date: Sat, 19 Jul 2008 22:03:20 -0600 (MDT)

Author: grothoff
Date: 2008-07-19 22:03:20 -0600 (Sat, 19 Jul 2008)
New Revision: 7474

Modified:
   GNUnet/src/util/error/error.c
Log:
ctx maybe NULL

Modified: GNUnet/src/util/error/error.c
===================================================================
--- GNUnet/src/util/error/error.c       2008-07-20 04:01:20 UTC (rev 7473)
+++ GNUnet/src/util/error/error.c       2008-07-20 04:03:20 UTC (rev 7474)
@@ -201,7 +201,8 @@
   tmptr = localtime (&timetmp);
   strftime (date, DATE_STR_SIZE, "%b %d %H:%M:%S", tmptr);
   now = GNUNET_get_time ();
-  if ((kind & GNUNET_GE_BULK) != 0)
+  if ((ctx != NULL) &&
+      ((kind & GNUNET_GE_BULK) != 0))
     {
       if ((ctx->last_bulk_time != 0) &&
           (0 == strncmp (buf, ctx->last_bulk, sizeof (ctx->last_bulk))))
@@ -223,8 +224,9 @@
           ctx->last_bulk_kind = kind;
         }
     }
-  if ((now - ctx->last_bulk_time > BULK_DELAY_THRESHOLD) ||
-      (ctx->last_bulk_repeat > BULK_REPEAT_THRESHOLD))
+  if ( (ctx != NULL) &&
+       ((now - ctx->last_bulk_time > BULK_DELAY_THRESHOLD) ||
+       (ctx->last_bulk_repeat > BULK_REPEAT_THRESHOLD)) )
     {
       flush_bulk (ctx, date);
       ctx->last_bulk_time = 0;





reply via email to

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