[svn-commits] rmudgett: trunk r401582 - in /trunk: ./ cdr/cdr_adaptive_odbc.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 23 11:52:13 CDT 2013


Author: rmudgett
Date: Wed Oct 23 11:52:11 2013
New Revision: 401582

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

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

Modified:
    trunk/   (props changed)
    trunk/cdr/cdr_adaptive_odbc.c

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

Modified: trunk/cdr/cdr_adaptive_odbc.c
URL: http://svnview.digium.com/svn/asterisk/trunk/cdr/cdr_adaptive_odbc.c?view=diff&rev=401582&r1=401581&r2=401582
==============================================================================
--- trunk/cdr/cdr_adaptive_odbc.c (original)
+++ trunk/cdr/cdr_adaptive_odbc.c Wed Oct 23 11:52:11 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 svn-commits mailing list