diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-03-20 12:33:58 -0400 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-03-20 12:33:58 -0400 |
commit | 04b8093435a70b681e49811443a07c341f4b3448 (patch) | |
tree | 6be1fb883305a8652889c91c6aeb881bfca7e2a9 | |
parent | ac31482873862f44a509d20f26c28f4647e99bbb (diff) | |
parent | c6c55ee7e53c9ecc31031bfd0690b8a182f04850 (diff) | |
download | pfsense-04b8093435a70b681e49811443a07c341f4b3448.zip pfsense-04b8093435a70b681e49811443a07c341f4b3448.tar.gz |
Merge pull request #3639 from doktornotor/patch-26
-rw-r--r-- | src/etc/inc/pfsense-utils.inc | 1 | ||||
-rwxr-xr-x | src/usr/local/bin/3gstats.php | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index 7aa5297..3e9767e 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -3031,6 +3031,7 @@ function huawei_service_to_string($state) { $modes[2] = gettext("Valid Service"); $modes[3] = gettext("Restricted Regional Service"); $modes[4] = gettext("Powersaving Service"); + $modes[255] = gettext("Unknown Service"); $string = $modes[$state]; return $string; } diff --git a/src/usr/local/bin/3gstats.php b/src/usr/local/bin/3gstats.php index b192865..28c3f31 100755 --- a/src/usr/local/bin/3gstats.php +++ b/src/usr/local/bin/3gstats.php @@ -22,7 +22,7 @@ ini_set("max_execution_time", "0"); -if(empty($argv[1])) { +if (empty($argv[1])) { echo "No modem device given \n"; exit(0); } @@ -37,7 +37,7 @@ $i = 0; $record = array(); $handle = fopen($device, "r"); -if(! $handle) { +if (!$handle) { echo "Can not open modem stats device\n"; exit(1); } @@ -51,8 +51,8 @@ $record['sent'] = 0; $record['received'] = 0; $record['bwupstream'] = 0; $record['bwdownstream'] = 0; -$record['simstate'] = 0; -$record['service'] = 0; +$record['simstate'] = 255; +$record['service'] = 255; while (true) { $string = ""; |