gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: prevent recursive entering of GNUNET_PQ_


From: Admin
Subject: [gnunet] branch master updated: prevent recursive entering of GNUNET_PQ_event_do_poll()
Date: Tue, 11 Feb 2025 15:18:56 +0100

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

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 234fa38d2 prevent recursive entering of GNUNET_PQ_event_do_poll()
234fa38d2 is described below

commit 234fa38d252e51292fc48363477d80946e3caa21
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Feb 11 15:18:47 2025 +0100

    prevent recursive entering of GNUNET_PQ_event_do_poll()
---
 src/lib/pq/pq_event.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lib/pq/pq_event.c b/src/lib/pq/pq_event.c
index 7506ff2f0..66c190bc4 100644
--- a/src/lib/pq/pq_event.c
+++ b/src/lib/pq/pq_event.c
@@ -188,9 +188,12 @@ do_notify (void *cls,
 void
 GNUNET_PQ_event_do_poll (struct GNUNET_PQ_Context *db)
 {
+  static bool in_poll;
   PGnotify *n;
   unsigned int cnt = 0;
 
+  if (in_poll)
+    return;
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "PG poll job active\n");
   if (1 !=
@@ -204,6 +207,7 @@ GNUNET_PQ_event_do_poll (struct GNUNET_PQ_Context *db)
     GNUNET_PQ_reconnect (db);
     return;
   }
+  in_poll = true;
   while (NULL != (n = PQnotifies (db->conn)))
   {
     struct GNUNET_ShortHashCode sh;
@@ -259,6 +263,7 @@ GNUNET_PQ_event_do_poll (struct GNUNET_PQ_Context *db)
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "PG poll job finishes after %u events\n",
               cnt);
+  in_poll = false;
 }
 
 

-- 
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]