projects
/
apps
/
pfixtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup start/refresh.
[apps/pfixtools.git]
/
postlicyd
/
filter.c
diff --git
a/postlicyd/filter.c
b/postlicyd/filter.c
index
14bfc9b
..
e108b25
100644
(file)
--- a/
postlicyd/filter.c
+++ b/
postlicyd/filter.c
@@
-281,6
+281,7
@@
bool filter_add_hook(filter_t *filter, const char *name, int name_len,
const char *value, int value_len)
{
filter_hook_t hook;
const char *value, int value_len)
{
filter_hook_t hook;
+ hook.filter_id = -1;
hook.type = hook_tokenize(name, name_len);
if (hook.type == HTK_UNKNOWN) {
err("unknown hook type %.*s", name_len, name);
hook.type = hook_tokenize(name, name_len);
if (hook.type == HTK_UNKNOWN) {
err("unknown hook type %.*s", name_len, name);
@@
-295,6
+296,7
@@
bool filter_add_hook(filter_t *filter, const char *name, int name_len,
/* Value format is (counter:id:incr)?(postfix:reply|filter_name)
*/
/* Value format is (counter:id:incr)?(postfix:reply|filter_name)
*/
+ hook.value = NULL;
if (strncmp(value, "counter:", 8) == 0) {
char *end = NULL;
value += 8;
if (strncmp(value, "counter:", 8) == 0) {
char *end = NULL;
value += 8;
@@
-327,7
+329,6
@@
bool filter_add_hook(filter_t *filter, const char *name, int name_len,
return false;
}
hook.value = m_strdup(hook.postfix ? value + 8 : value);
return false;
}
hook.value = m_strdup(hook.postfix ? value + 8 : value);
- hook.filter_id = -1;
array_add(filter->hooks, hook);
return true;
}
array_add(filter->hooks, hook);
return true;
}