path: root/src/queue.c
diff options
authorPablo Neira Ayuso <>2009-06-20 21:11:06 +0200
committerPablo Neira Ayuso <>2009-06-20 21:11:06 +0200
commit4cfc8533743a766db0b2c8ae27b7bba312eb3ec0 (patch)
tree68c51ca4088b7ae8286d022843e0facd62885fe6 /src/queue.c
parentfaea76e8bc626549f4d338a3bf22e466336264ca (diff)
conntrackd: add the name field to queues
This patch adds the name field to identify the queue by means of a string. This patch is used by the next one that introduces per-queue statistics. Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/queue.c')
1 files changed, 4 insertions, 1 deletions
diff --git a/src/queue.c b/src/queue.c
index 7b36dc6..e5dc307 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -23,7 +23,8 @@
#include <stdlib.h>
#include <string.h>
-struct queue *queue_create(int max_objects, unsigned int flags)
+struct queue *
+queue_create(const char *name, int max_objects, unsigned int flags)
struct queue *b;
@@ -42,6 +43,8 @@ struct queue *queue_create(int max_objects, unsigned int flags)
return NULL;
+ strncpy(b->name, name, QUEUE_NAMELEN);
+ b->name[QUEUE_NAMELEN-1]='\0';
return b;