summaryrefslogtreecommitdiff
path: root/src/gnsrecord/gnsrecord.c
diff options
context:
space:
mode:
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)
}
+enum GNUNET_GenericReturnValue
+GNUNET_GNSRECORD_is_critical (uint32_t type)
+{
+ struct Plugin *plugin;
+
+ if (GNUNET_GNSRECORD_TYPE_ANY == type)
+ return GNUNET_NO;
+ init ();
+ for (unsigned int i = 0; i < num_plugins; i++)
+ {
+ plugin = gns_plugins[i];
+ if (NULL == plugin->api->is_critical)
+ continue;
+ if (GNUNET_NO == plugin->api->is_critical (plugin->api->cls, type))
+ continue;
+ return GNUNET_YES;
+ }
+ return GNUNET_NO;
+}
+
+
/* end of gnsrecord.c */