[freeside-commits] branch master updated. 4e95cbcc7a876017487f098a06b957e79c0acf77

Mark Wells mark at 420.am
Thu Apr 10 15:22:05 PDT 2014


The branch, master has been updated
       via  4e95cbcc7a876017487f098a06b957e79c0acf77 (commit)
      from  74e927acfe159514ba93b51bd79ccf68f1846c89 (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 4e95cbcc7a876017487f098a06b957e79c0acf77
Author: Mark Wells <mark at freeside.biz>
Date:   Thu Apr 10 15:20:47 2014 -0700

    stop new IP address assignment code from tripping over ancient svc_acct.slipip values, #28184

diff --git a/FS/FS/svc_IP_Mixin.pm b/FS/FS/svc_IP_Mixin.pm
index ff7c2f5..5b06082 100644
--- a/FS/FS/svc_IP_Mixin.pm
+++ b/FS/FS/svc_IP_Mixin.pm
@@ -96,7 +96,12 @@ sub _used_addresses {
   my %hash = ( $ip_field => { op => '!=', value => '' } );
   #$hash{'blocknum'} = $block->blocknum if $block;
   $hash{'svcnum'} = { op => '!=', value => $exclude->svcnum } if ref $exclude;
-  map { $_->NetAddr->addr } qsearch($class->table, \%hash);
+  map { my $na = $_->NetAddr; $na ? $na->addr : () }
+    qsearch({
+        table     => $class->table,
+        hashref   => \%hash,
+        extra_sql => " AND $ip_field != '0e0'",
+    });
 }
 
 sub _is_used {

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/svc_IP_Mixin.pm |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list