Skip to content
Snippets Groups Projects
Commit 2966ca28 authored by Richard Mudgett's avatar Richard Mudgett
Browse files

cdr_adaptive_odbc: Also apply a filter when the CDR value is empty.

Extra CDR records are written if a filtered CDR value is empty because the
filter is not checked.

(closes issue ASTERISK-22272)
Reported by: Jordi Llull Chavarria
........

Merged revisions 401577 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 401579 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 401581 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 3975617f
No related branches found
No related tags found
No related merge requests found
......@@ -720,6 +720,14 @@ static int odbc_log(struct ast_cdr *cdr)
continue;
}
first = 0;
} else if (entry->filtervalue
&& ((!entry->negatefiltervalue && entry->filtervalue[0] != '\0')
|| (entry->negatefiltervalue && entry->filtervalue[0] == '\0'))) {
ast_verb(4, "CDR column '%s' was not set and does not match filter of"
" %s'%s'. Cancelling this CDR.\n",
entry->cdrname, entry->negatefiltervalue ? "!" : "",
entry->filtervalue);
goto early_release;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment