summaryrefslogtreecommitdiffstats
path: root/src/fastd.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-01-14 00:59:49 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-01-14 00:59:49 +0100
commit51a1da3272c58e631fc5cecb181327bcceb5f311 (patch)
treea214a6a609a71023c472cd998f11225b3f9a5332 /src/fastd.h
parent7815904f1136339d47329a3871d9939eac34f830 (diff)
downloadfastd-51a1da3272c58e631fc5cecb181327bcceb5f311.tar
fastd-51a1da3272c58e631fc5cecb181327bcceb5f311.zip
Allow to configure methods per peer group
Diffstat (limited to 'src/fastd.h')
-rw-r--r--src/fastd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fastd.h b/src/fastd.h
index 8af0556..6e4cda6 100644
--- a/src/fastd.h
+++ b/src/fastd.h
@@ -450,6 +450,18 @@ static inline const char * fastd_string_stack_get(const fastd_string_stack_t *st
return stack ? stack->str : NULL;
}
+/** */
+static inline bool fastd_string_stack_contains(const fastd_string_stack_t *stack, const char *str) {
+ while (stack) {
+ if (strcmp(stack->str, str) == 0)
+ return true;
+
+ stack = stack->next;
+ }
+
+ return false;
+}
+
/** Frees a whole string stack */
static inline void fastd_string_stack_free(fastd_string_stack_t *str) {
while (str) {