aboutsummaryrefslogtreecommitdiff
path: root/src/gnsrecord/gnsrecord.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-02-03 18:12:10 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2022-02-03 18:12:10 +0100
commit3d72be07448fd435640c6d0fdc2859601319d07e (patch)
tree253ed9212019d08725166300f449645e34c463b1 /src/gnsrecord/gnsrecord.c
parent3146c65c67b93ce4eb5bf27775167fde65f5e3c4 (diff)
downloadgnunet-3d72be07448fd435640c6d0fdc2859601319d07e.tar.gz
gnunet-3d72be07448fd435640c6d0fdc2859601319d07e.zip
GNS: Introduce CRITICAL flag. Fixes #7169
Diffstat (limited to 'src/gnsrecord/gnsrecord.c')
-rw-r--r--src/gnsrecord/gnsrecord.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gnsrecord/gnsrecord.c b/src/gnsrecord/gnsrecord.c
index e9994a868..52c480ef6 100644
--- a/src/gnsrecord/gnsrecord.c
+++ b/src/gnsrecord/gnsrecord.c
@@ -260,4 +260,25 @@ GNUNET_GNSRECORD_number_to_typename (uint32_t type)
260} 260}
261 261
262 262
263enum GNUNET_GenericReturnValue
264GNUNET_GNSRECORD_is_critical (uint32_t type)
265{
266 struct Plugin *plugin;
267
268 if (GNUNET_GNSRECORD_TYPE_ANY == type)
269 return GNUNET_NO;
270 init ();
271 for (unsigned int i = 0; i < num_plugins; i++)
272 {
273 plugin = gns_plugins[i];
274 if (NULL == plugin->api->is_critical)
275 continue;
276 if (GNUNET_NO == plugin->api->is_critical (plugin->api->cls, type))
277 continue;
278 return GNUNET_YES;
279 }
280 return GNUNET_NO;
281}
282
283
263/* end of gnsrecord.c */ 284/* end of gnsrecord.c */