[freeside-commits] branch FREESIDE_3_BRANCH updated. 2262aed6720482f35b5c71fcc608ddca4bf51cb6
Ivan
ivan at 420.am
Tue Mar 21 08:52:33 PDT 2017
The branch, FREESIDE_3_BRANCH has been updated
via 2262aed6720482f35b5c71fcc608ddca4bf51cb6 (commit)
from a4ce3adf4f21c0e4678785fe6a1eea03e1bdcd1b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2262aed6720482f35b5c71fcc608ddca4bf51cb6
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Mar 21 08:52:32 2017 -0700
asterisk v12 CDRs, RT#71704
diff --git a/FS/bin/freeside-cdr-asterisk_sql b/FS/bin/freeside-cdr-asterisk_sql
index 78ef7a5..be8fb03 100755
--- a/FS/bin/freeside-cdr-asterisk_sql
+++ b/FS/bin/freeside-cdr-asterisk_sql
@@ -104,17 +104,17 @@ while ( my $row = $sth->fetchrow_hashref ) {
$imports++;
- my $where = '';
+ my $usql = "UPDATE $table SET freesidestatus = 'done' WHERE ";
my @args = ();
if ( $opt{V} >= 12 ) {
- $where = 'id = '. $row->{'id'};
+ $usql .= ' id = '. $row->{'id'};
@args = ( undef );
} else {
- $where = 'calldate = ? AND src = ? AND dst = ?';
+ $usql .= ' calldate = ? AND src = ? AND dst = ?';
@args = ( undef, $row->{'calldate'}, $row->{'src'}, $row->{'dst'}, );
}
- if ( $dbi->do("UPDATE $table SET freesidestatus = 'done' $where", @args) ) {
+ if ( $dbi->do($usql, @args) ) {
$updates++;
} else {
warn "failed to set status: ".$dbi->errstr."\n";
-----------------------------------------------------------------------
Summary of changes:
FS/bin/freeside-cdr-asterisk_sql | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list