]> git.gsnw.org Git - m0n0chwall.git/commitdiff
Fixes problem with integer values which are internally stored as string which need...
authorjdegraeve <jdegraeve@e36fee2c-cc09-0410-a7cc-ebac5c6737de>
Fri, 10 Feb 2006 15:26:48 +0000 (15:26 +0000)
committerjdegraeve <jdegraeve@e36fee2c-cc09-0410-a7cc-ebac5c6737de>
Fri, 10 Feb 2006 15:26:48 +0000 (15:26 +0000)
git-svn-id: https://svn.m0n0.ch/wall/trunk@82 e36fee2c-cc09-0410-a7cc-ebac5c6737de

captiveportal/radius_accounting.inc

index 168ee4ab98036c1dc9af18181d923978b4dba07e..2ad5d25176fcd0a8395de150f5705e5644f4d2fb 100644 (file)
@@ -32,7 +32,7 @@
 
     This code cannot simply be copied and put under the GNU Public License or 
     any other GPL-like (LGPL, GPL2) License.
-
+settype($foo, "integer")
         This code is made possible thx to samples made by Michael Bretterklieber <michael@bretterklieber.com>
         author of the PHP PECL Radius package
 
@@ -165,6 +165,14 @@ function RADIUS_ACCOUNTING_STOP($ruleno,$username,$sessionid,$start_time,$radius
     $volume['output_bytes_radius'] = remainder($volume['output_bytes']);
     $volume['output_gigawords'] = gigawords($volume['output_bytes']);
 
+    // Make the volume data safe for our radius.inc functions (It really needs to be integer or we get an error)
+    settype($volume['input_pkts'], "integer");
+    settype($volume['input_bytes_radius'], "integer");
+    settype($volume['input_gigawords'], "integer");
+    settype($volume['output_pkts'], "integer");
+    settype($volume['output_bytes_radius'], "integer");
+    settype($volume['output_gigawords'], "integer");
+
     switch($radiusvendor) {
 
         case 'cisco':