projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7023f33
)
libs/core: remove now obsolete uint() wrapper in network model
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 13 Jan 2013 21:03:28 +0000
(21:03 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 13 Jan 2013 21:03:28 +0000
(21:03 +0000)
libs/core/luasrc/model/network.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/model/network.lua
b/libs/core/luasrc/model/network.lua
index
56f1751
..
09a58d7
100644
(file)
--- a/
libs/core/luasrc/model/network.lua
+++ b/
libs/core/luasrc/model/network.lua
@@
-1164,31
+1164,24
@@
function interface.is_bridgeport(self)
return self.dev and self.dev.bridge and true or false
end
return self.dev and self.dev.bridge and true or false
end
-local function uint(x)
- if x then
- return (x < 0) and ((2^32) + x) or x
- end
- return 0
-end
-
function interface.tx_bytes(self)
local stat = self:_ubus("statistics")
function interface.tx_bytes(self)
local stat = self:_ubus("statistics")
- return stat and
uint(stat.tx_bytes)
or 0
+ return stat and
stat.tx_bytes
or 0
end
function interface.rx_bytes(self)
local stat = self:_ubus("statistics")
end
function interface.rx_bytes(self)
local stat = self:_ubus("statistics")
- return stat and
uint(stat.rx_bytes)
or 0
+ return stat and
stat.rx_bytes
or 0
end
function interface.tx_packets(self)
local stat = self:_ubus("statistics")
end
function interface.tx_packets(self)
local stat = self:_ubus("statistics")
- return stat and
uint(stat.tx_packets)
or 0
+ return stat and
stat.tx_packets
or 0
end
function interface.rx_packets(self)
local stat = self:_ubus("statistics")
end
function interface.rx_packets(self)
local stat = self:_ubus("statistics")
- return stat and
uint(stat.rx_packets)
or 0
+ return stat and
stat.rx_packets
or 0
end
function interface.get_network(self)
end
function interface.get_network(self)