return HostGetStorageById(host, tag_id) ? 1 : 0;
}
-void DetectTagForceCleanup(Host *host) {
- void *tag = HostGetStorageById(host, tag_id);
- if (tag != NULL) {
- DetectTagDataListFree(tag);
- HostSetStorageById(host, tag_id, NULL);
- }
-}
-
static DetectTagDataEntry *DetectTagDataCopy(DetectTagDataEntry *dtd) {
DetectTagDataEntry *tde = SCMalloc(sizeof(DetectTagDataEntry));
if (unlikely(tde == NULL)) {
int TagTimeoutCheck(Host *, struct timeval *);
-void DetectTagForceCleanup(Host *);
int TagHostHasTag(Host *host);
#endif /* __DETECT_ENGINE_TAG_H__ */
return HostGetStorageById(host, threshold_id) ? 1 : 0;
}
-void DetectThresholdForceCleanup(Host *host) {
- void *t = HostGetStorageById(host, threshold_id);
- if (t != NULL) {
- ThresholdListFree(t);
- HostSetStorageById(host, threshold_id, NULL);
- }
-
-}
-
/**
* \brief Return next DetectThresholdData for signature
*
int ThresholdHostStorageId(void);
int ThresholdHostHasThreshold(Host *);
-void DetectThresholdForceCleanup(Host *);
DetectThresholdData *SigGetThresholdType(Signature *, Packet *);
DetectThresholdData *SigGetThresholdTypeIter(Signature *, Packet *, SigMatch **);
HRLOCK_LOCK(hb);
while (h) {
if ((SC_ATOMIC_GET(h->use_cnt) > 0) && (h->iprep != NULL)) {
- /* iprep is attached to host only clear tag and threshold */
- DetectTagForceCleanup(h);
- DetectThresholdForceCleanup(h);
+ /* iprep is attached to host only clear local storage */
+ HostFreeStorage(h);
h = h->hnext;
} else {
Host *n = h->hnext;