[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: only include result set of not empty aft
From: |
gnunet |
Subject: |
[gnunet] branch master updated: only include result set of not empty after filtering |
Date: |
Sun, 10 May 2020 11:23:51 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 9a323e17b only include result set of not empty after filtering
9a323e17b is described below
commit 9a323e17b449ff2ac09336e11263c6cca00a45ea
Author: Martin Schanzenbach <address@hidden>
AuthorDate: Sun May 10 11:18:50 2020 +0200
only include result set of not empty after filtering
---
src/namestore/plugin_rest_namestore.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/namestore/plugin_rest_namestore.c
b/src/namestore/plugin_rest_namestore.c
index 4184d93a1..5a7e8c6cf 100644
--- a/src/namestore/plugin_rest_namestore.c
+++ b/src/namestore/plugin_rest_namestore.c
@@ -525,10 +525,14 @@ namestore_list_iteration (void *cls,
rd_filtered[j].data = rd[i].data;
j++;
}
- record_obj = GNUNET_JSON_from_gnsrecord (rname,
- rd_filtered,
- j);
- json_array_append_new (handle->resp_object, record_obj);
+ /** Only add if not empty **/
+ if (j > 0)
+ {
+ record_obj = GNUNET_JSON_from_gnsrecord (rname,
+ rd_filtered,
+ j);
+ json_array_append_new (handle->resp_object, record_obj);
+ }
GNUNET_NAMESTORE_zone_iterator_next (handle->list_it, 1);
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: only include result set of not empty after filtering,
gnunet <=