|
|
@ -54,7 +54,7 @@
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* \retval id Return the id created for the new MpmCtx profile.
|
|
|
|
* \retval id Return the id created for the new MpmCtx profile.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
int32_t MpmFactoryRegisterMpmCtxProfile(DetectEngineCtx *de_ctx, const char *name, uint8_t flags)
|
|
|
|
int32_t MpmFactoryRegisterMpmCtxProfile(DetectEngineCtx *de_ctx, const char *name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
void *ptmp;
|
|
|
|
void *ptmp;
|
|
|
|
/* the very first entry */
|
|
|
|
/* the very first entry */
|
|
|
@ -96,9 +96,6 @@ int32_t MpmFactoryRegisterMpmCtxProfile(DetectEngineCtx *de_ctx, const char *nam
|
|
|
|
* the array */
|
|
|
|
* the array */
|
|
|
|
item[0].id = 0;
|
|
|
|
item[0].id = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/* store the flag */
|
|
|
|
|
|
|
|
item[0].flags = flags;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* store the newly created item */
|
|
|
|
/* store the newly created item */
|
|
|
|
de_ctx->mpm_ctx_factory_container->items = item;
|
|
|
|
de_ctx->mpm_ctx_factory_container->items = item;
|
|
|
|
de_ctx->mpm_ctx_factory_container->no_of_items++;
|
|
|
|
de_ctx->mpm_ctx_factory_container->no_of_items++;
|
|
|
@ -129,7 +126,6 @@ int32_t MpmFactoryRegisterMpmCtxProfile(DetectEngineCtx *de_ctx, const char *nam
|
|
|
|
memset(items[i].mpm_ctx_tc, 0, sizeof(MpmCtx));
|
|
|
|
memset(items[i].mpm_ctx_tc, 0, sizeof(MpmCtx));
|
|
|
|
items[i].mpm_ctx_tc->global = 1;
|
|
|
|
items[i].mpm_ctx_tc->global = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
items[i].flags = flags;
|
|
|
|
|
|
|
|
return items[i].id;
|
|
|
|
return items[i].id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -169,7 +165,6 @@ int32_t MpmFactoryRegisterMpmCtxProfile(DetectEngineCtx *de_ctx, const char *nam
|
|
|
|
new_item[0].mpm_ctx_tc->global = 1;
|
|
|
|
new_item[0].mpm_ctx_tc->global = 1;
|
|
|
|
|
|
|
|
|
|
|
|
new_item[0].id = de_ctx->mpm_ctx_factory_container->no_of_items;
|
|
|
|
new_item[0].id = de_ctx->mpm_ctx_factory_container->no_of_items;
|
|
|
|
new_item[0].flags = flags;
|
|
|
|
|
|
|
|
de_ctx->mpm_ctx_factory_container->no_of_items++;
|
|
|
|
de_ctx->mpm_ctx_factory_container->no_of_items++;
|
|
|
|
|
|
|
|
|
|
|
|
/* the newly created id */
|
|
|
|
/* the newly created id */
|
|
|
|