[asterisk-commits] rmudgett: branch 12 r401581 - in /branches/12: ./ cdr/cdr_adaptive_odbc.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 23 11:49:53 CDT 2013


Author: rmudgett
Date: Wed Oct 23 11:49:51 2013
New Revision: 401581

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401581
Log:
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

Modified:
    branches/12/   (props changed)
    branches/12/cdr/cdr_adaptive_odbc.c

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/cdr/cdr_adaptive_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/cdr/cdr_adaptive_odbc.c?view=diff&rev=401581&r1=401580&r2=401581
==============================================================================
--- branches/12/cdr/cdr_adaptive_odbc.c (original)
+++ branches/12/cdr/cdr_adaptive_odbc.c Wed Oct 23 11:49:51 2013
@@ -720,6 +720,14 @@
 					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;
 			}
 		}
 




More information about the asterisk-commits mailing list