gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 03/08: NAMESTORE: Fix existing monitoring test race condition


From: gnunet
Subject: [gnunet] 03/08: NAMESTORE: Fix existing monitoring test race condition
Date: Fri, 23 Sep 2022 06:01:07 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit d78b7864d1754f2b2c5d3c47107808dfacc68e05
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Fri Sep 23 01:05:53 2022 +0900

    NAMESTORE: Fix existing monitoring test race condition
    
    The monitoring was started too late at which point the monitor messages
    may have already been sent and will never arrive
---
 .../test_namestore_api_monitoring_existing.c       | 38 +++++++++++-----------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/namestore/test_namestore_api_monitoring_existing.c 
b/src/namestore/test_namestore_api_monitoring_existing.c
index 366f5739f..95907f34a 100644
--- a/src/namestore/test_namestore_api_monitoring_existing.c
+++ b/src/namestore/test_namestore_api_monitoring_existing.c
@@ -250,25 +250,6 @@ put_cont (void *cls,
 
   if (3 == c)
   {
-    /* Start monitoring */
-    zm = GNUNET_NAMESTORE_zone_monitor_start (cfg,
-                                              &privkey,
-                                              GNUNET_YES,
-                                              &fail_cb,
-                                              NULL,
-                                              &zone_proc,
-                                              NULL,
-                                              &sync_cb,
-                                              NULL);
-    if (NULL == zm)
-    {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                  "Failed to create zone monitor\n");
-      GNUNET_break (0);
-      res = 1;
-      GNUNET_SCHEDULER_shutdown ();
-      return;
-    }
   }
 }
 
@@ -324,6 +305,25 @@ run (void *cls,
                                               NULL);
     return;
   }
+  /* Start monitoring */
+  zm = GNUNET_NAMESTORE_zone_monitor_start (cfg,
+                                            &privkey,
+                                            GNUNET_YES,
+                                            &fail_cb,
+                                            NULL,
+                                            &zone_proc,
+                                            NULL,
+                                            &sync_cb,
+                                            NULL);
+  if (NULL == zm)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Failed to create zone monitor\n");
+    GNUNET_break (0);
+    res = 1;
+    GNUNET_SCHEDULER_shutdown ();
+    return;
+  }
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 3\n");

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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