static TmEcode UnixManagerRulesetProfileStartCommand(json_t *cmd, json_t *server_msg, void *data)
{
SCEnter();
-
- int ret = SCProfileRuleStartCollection();
- if (ret != TM_ECODE_OK) {
- json_object_set_new(server_msg, "message", json_string("NOK"));
- SCReturnInt(TM_ECODE_FAILED);
- }
+ SCProfileRuleStartCollection();
json_object_set_new(server_msg, "message", json_string("OK"));
SCReturnInt(TM_ECODE_OK);
}
static TmEcode UnixManagerRulesetProfileStopCommand(json_t *cmd, json_t *server_msg, void *data)
{
SCEnter();
-
- int ret = SCProfileRuleStopCollection();
- if (ret != TM_ECODE_OK) {
- json_object_set_new(server_msg, "message", json_string("NOK"));
- SCReturnInt(TM_ECODE_FAILED);
- }
+ SCProfileRuleStopCollection();
json_object_set_new(server_msg, "message", json_string("OK"));
SCReturnInt(TM_ECODE_OK);
}
-
#endif
static TmEcode UnixManagerShowFailedRules(json_t *cmd,
#endif /* UNITTESTS */
}
-int SCProfileRuleStartCollection(void)
+void SCProfileRuleStartCollection(void)
{
- SCReturnInt(TM_ECODE_OK);
}
-int SCProfileRuleStopCollection(void)
+void SCProfileRuleStopCollection(void)
{
- SCReturnInt(TM_ECODE_OK);
}
#elif PROFILE_RULES
return 0;
}
-int SCProfileRuleStartCollection(void)
+void SCProfileRuleStartCollection(void)
{
SC_ATOMIC_SET(profiling_rules_active, true);
- SCReturnInt(TM_ECODE_OK);
}
-int SCProfileRuleStopCollection(void)
+void SCProfileRuleStopCollection(void)
{
SC_ATOMIC_SET(profiling_rules_active, false);
- SCReturnInt(TM_ECODE_OK);
}
#endif /* PROFILING */
void SCProfilingRuleThreadCleanup(DetectEngineThreadCtx *);
int SCProfileRuleStart(Packet *p);
json_t *SCProfileRuleTriggerDump(DetectEngineCtx *de_ctx);
-int SCProfileRuleStartCollection(void);
-int SCProfileRuleStopCollection(void);
+void SCProfileRuleStartCollection(void);
+void SCProfileRuleStopCollection(void);
void SCProfilingRuleThreatAggregate(DetectEngineThreadCtx *det_ctx);
#define RULE_PROFILING_START(p) \