Project

General

Profile

Bug #601 ยป 0001-libhtp-don-t-use-internal-iterator.patch

Victor Julien, 10/12/2012 09:44 AM

View differences:

libhtp/htp/hooks.c
return HOOK_OK;
}
/* HACK https://redmine.openinfosecfoundation.org/issues/601 */
size_t i = 0;
for (i = 0; i < ((list_array_t *)hook->callbacks)->current_size; i++) {
void *r = ((list_array_t *)hook->callbacks)->elements[i];
if (r == NULL)
continue;
htp_callback_t *callback = r;
if (callback->fn(data) == HOOK_ERROR) {
return HOOK_ERROR;
}
}
#if 0
htp_callback_t *callback = NULL;
list_iterator_reset(hook->callbacks);
while ((callback = list_iterator_next(hook->callbacks)) != NULL) {
......
return HOOK_ERROR;
}
}
#endif
return HOOK_OK;
}
......
return HOOK_DECLINED;
}
/* HACK https://redmine.openinfosecfoundation.org/issues/601 */
size_t i = 0;
for (i = 0; i < ((list_array_t *)hook->callbacks)->current_size; i++) {
void *r = ((list_array_t *)hook->callbacks)->elements[i];
if (r == NULL)
continue;
htp_callback_t *callback = r;
int status = callback->fn(data);
if (status != HOOK_DECLINED) {
return status;
}
}
#if 0
htp_callback_t *callback = NULL;
list_iterator_reset(hook->callbacks);
while ((callback = list_iterator_next(hook->callbacks)) != NULL) {
......
return status;
}
}
#endif
return HOOK_DECLINED;
}
    (1-1/1)