summaryrefslogtreecommitdiff
path: root/FS/FS/svc_broadband.pm
diff options
context:
space:
mode:
authorjeff <jeff>2009-03-13 18:22:21 +0000
committerjeff <jeff>2009-03-13 18:22:21 +0000
commit64916ad920572e19351df79127d4822fab57f621 (patch)
tree7ecfa41dab4b65a9ca56e3fe54e590f35fe343e8 /FS/FS/svc_broadband.pm
parent2ea58badb5e0e2985a796f8b614912db9b6e43bf (diff)
prevent more duplicate MACs from sneaking in in the interim
Diffstat (limited to 'FS/FS/svc_broadband.pm')
-rwxr-xr-xFS/FS/svc_broadband.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm
index b808527..eb29646 100755
--- a/FS/FS/svc_broadband.pm
+++ b/FS/FS/svc_broadband.pm
@@ -217,6 +217,10 @@ sub check {
;
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'; }