fix filters (reported on mailing list use jira next time =/)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16527 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2010-01-28 01:00:04 +00:00
parent 35fb1f546f
commit f859964993
5 changed files with 28 additions and 18 deletions

View File

@@ -254,7 +254,7 @@ ESL_DECLARE(char *)esl_event_get_body(esl_event_t *event)
return (event ? event->body : NULL);
}
ESL_DECLARE(esl_status_t) esl_event_del_header(esl_event_t *event, const char *header_name)
ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const char *header_name, const char *val)
{
esl_event_header_t *hp, *lp = NULL, *tp;
esl_status_t status = ESL_FAIL;
@@ -271,7 +271,7 @@ ESL_DECLARE(esl_status_t) esl_event_del_header(esl_event_t *event, const char *h
esl_assert(x < 1000);
hash = esl_ci_hashfunc_default(header_name, &hlen);
if (hp->name && (!hp->hash || hash == hp->hash) && !strcasecmp(header_name, hp->name)) {
if (hp->name && (!hp->hash || hash == hp->hash) && !strcasecmp(header_name, hp->name) && (esl_strlen_zero(val) || !strcmp(hp->value, val))) {
if (lp) {
lp->next = hp->next;
} else {