summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2009-08-05 02:27:10 +0000
committerivan <ivan>2009-08-05 02:27:10 +0000
commitbc6ae86fc9111d252e2dc984f0fb005bf5d825eb (patch)
treeda72c2e84f9a032f68afdf8abc4637b4f2f17e50
parent136e8a1ac9cd533671844381a1754acbbd6a170b (diff)
export negative byte values to chillispot attributes as 0, RT#5815
-rw-r--r--FS/FS/svc_acct.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index 8376d7bd0..d6d132b41 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -1408,6 +1408,7 @@ sub radius_reply {
my $is = $whatis{$what}.'bytes';
if ( $self->$is() =~ /\d/ ) {
my $big = new Math::BigInt $self->$is();
+ $big = new Math::BigInto '0' if $big->is_neg();
my $att = "Chillispot-Max-\u$what";
$reply{"$att-Octets"} = $big->copy->band(0xffffffff)->bstr;
$reply{"$att-Gigawords"} = $big->copy->brsft(32)->bstr;