From: Jeff Lucovsky Date: Sun, 7 Jan 2024 14:34:45 +0000 (-0500) Subject: example/plugin: Use ThreadId X-Git-Tag: suricata-8.0.0-beta1~1642 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bf92bb14f5cdfef594112d716b5cdb937dcbf92;p=thirdparty%2Fsuricata.git example/plugin: Use ThreadId --- diff --git a/examples/plugins/c-json-filetype/filetype.c b/examples/plugins/c-json-filetype/filetype.c index 9c81d7f032..cf8ca64d28 100644 --- a/examples/plugins/c-json-filetype/filetype.c +++ b/examples/plugins/c-json-filetype/filetype.c @@ -22,7 +22,7 @@ #define FILETYPE_NAME "json-filetype-plugin" -static int FiletypeThreadInit(void *ctx, int thread_id, void **thread_data); +static int FiletypeThreadInit(void *ctx, ThreadId thread_id, void **thread_data); static int FiletypeThreadDeinit(void *ctx, void *thread_data); /** @@ -30,7 +30,7 @@ static int FiletypeThreadDeinit(void *ctx, void *thread_data); */ typedef struct ThreadData_ { /** The thread ID, for demonstration purposes only. */ - int thread_id; + ThreadId thread_id; /** The number of records logged on this thread. */ uint64_t count; @@ -143,7 +143,7 @@ static void FiletypeDeinit(void *data) * Suricata, but instead this plugin chooses to use this method to create a * default (single) thread context. */ -static int FiletypeThreadInit(void *ctx, int thread_id, void **thread_data) +static int FiletypeThreadInit(void *ctx, ThreadId thread_id, void **thread_data) { ThreadData *tdata = SCCalloc(1, sizeof(ThreadData)); if (tdata == NULL) {