aboutsummaryrefslogtreecommitdiff
path: root/src/pq
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-11-23 13:10:07 +0100
committerChristian Grothoff <christian@grothoff.org>2022-11-23 13:10:07 +0100
commit28a4f4e5d78df67ccae80e1cf21a69227bf48f96 (patch)
tree8986d1183a2487f18602dd8dea4f7e0f2a619a47 /src/pq
parentbf175e5d2785033528128909457e382cb1929165 (diff)
downloadgnunet-28a4f4e5d78df67ccae80e1cf21a69227bf48f96.tar.gz
gnunet-28a4f4e5d78df67ccae80e1cf21a69227bf48f96.zip
add function to compute channel name for notifications
Diffstat (limited to 'src/pq')
-rw-r--r--src/pq/pq_event.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pq/pq_event.c b/src/pq/pq_event.c
index 0e56c8b70..d1d34422b 100644
--- a/src/pq/pq_event.c
+++ b/src/pq/pq_event.c
@@ -512,6 +512,21 @@ GNUNET_PQ_event_listen_cancel (struct GNUNET_DB_EventHandler *eh)
512} 512}
513 513
514 514
515char *
516GNUNET_PG_get_event_notify_channel (const struct GNUNET_DB_EventHeaderP *es)
517{
518 char sql[16 + 64 + extra_size * 8 / 5 + 8];
519 char *end;
520
521 end = stpcpy (sql,
522 "NOTIFY X");
523 end = es_to_channel (es,
524 end);
525 GNUNET_assert (NULL != end);
526 return GNUNET_strdup (sql);
527}
528
529
515void 530void
516GNUNET_PQ_event_notify (struct GNUNET_PQ_Context *db, 531GNUNET_PQ_event_notify (struct GNUNET_PQ_Context *db,
517 const struct GNUNET_DB_EventHeaderP *es, 532 const struct GNUNET_DB_EventHeaderP *es,