[freeside-commits] freeside/FS/FS svc_broadband.pm,1.16,1.17

Jeff Finucane,420,, jeff at wavetail.420.am
Fri Mar 13 11:22:24 PDT 2009


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv26986

Modified Files:
	svc_broadband.pm 
Log Message:
prevent more duplicate MACs from sneaking in in the interim

Index: svc_broadband.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_broadband.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- svc_broadband.pm	27 Sep 2008 03:01:43 -0000	1.16
+++ svc_broadband.pm	13 Mar 2009 18:22:21 -0000	1.17
@@ -217,6 +217,10 @@
   ;
   return $error if $error;
 
+  #redundant, but prevents further problems until column constraint in place
+  return "MAC already in use"
+    if scalar( qsearch( 'svc_broadband', { 'mac_addr', $self->mac_addr } ) );
+
   if($self->speed_up < 0) { return 'speed_up must be positive'; }
   if($self->speed_down < 0) { return 'speed_down must be positive'; }
 



More information about the freeside-commits mailing list