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:
51f67c7
)
nixio: Device stats are unsinged from kernel and likely to overflow so use pushnumber...
author
Steven Barth
<steven@midlink.org>
Sun, 1 Nov 2009 18:29:15 +0000
(18:29 +0000)
committer
Steven Barth
<steven@midlink.org>
Sun, 1 Nov 2009 18:29:15 +0000
(18:29 +0000)
libs/nixio/src/address.c
patch
|
blob
|
history
diff --git
a/libs/nixio/src/address.c
b/libs/nixio/src/address.c
index
33f7ce4
..
41c6b8a
100644
(file)
--- a/
libs/nixio/src/address.c
+++ b/
libs/nixio/src/address.c
@@
-420,34
+420,34
@@
static int nixio_getifaddrs(lua_State *L) {
lua_createtable(L, 0, 10);
struct nixio__nds *stats = c->ifa_data;
lua_createtable(L, 0, 10);
struct nixio__nds *stats = c->ifa_data;
- lua_push
integ
er(L, stats->rx_packets);
+ lua_push
numb
er(L, stats->rx_packets);
lua_setfield(L, -2, "rx_packets");
lua_setfield(L, -2, "rx_packets");
- lua_push
integ
er(L, stats->tx_packets);
+ lua_push
numb
er(L, stats->tx_packets);
lua_setfield(L, -2, "tx_packets");
lua_setfield(L, -2, "tx_packets");
- lua_push
integ
er(L, stats->rx_bytes);
+ lua_push
numb
er(L, stats->rx_bytes);
lua_setfield(L, -2, "rx_bytes");
lua_setfield(L, -2, "rx_bytes");
- lua_push
integ
er(L, stats->tx_bytes);
+ lua_push
numb
er(L, stats->tx_bytes);
lua_setfield(L, -2, "tx_bytes");
lua_setfield(L, -2, "tx_bytes");
- lua_push
integ
er(L, stats->rx_errors);
+ lua_push
numb
er(L, stats->rx_errors);
lua_setfield(L, -2, "rx_errors");
lua_setfield(L, -2, "rx_errors");
- lua_push
integ
er(L, stats->tx_errors);
+ lua_push
numb
er(L, stats->tx_errors);
lua_setfield(L, -2, "tx_errors");
lua_setfield(L, -2, "tx_errors");
- lua_push
integ
er(L, stats->rx_dropped);
+ lua_push
numb
er(L, stats->rx_dropped);
lua_setfield(L, -2, "rx_dropped");
lua_setfield(L, -2, "rx_dropped");
- lua_push
integ
er(L, stats->tx_dropped);
+ lua_push
numb
er(L, stats->tx_dropped);
lua_setfield(L, -2, "tx_dropped");
lua_setfield(L, -2, "tx_dropped");
- lua_push
integ
er(L, stats->multicast);
+ lua_push
numb
er(L, stats->multicast);
lua_setfield(L, -2, "multicast");
lua_setfield(L, -2, "multicast");
- lua_push
integ
er(L, stats->collisions);
+ lua_push
numb
er(L, stats->collisions);
lua_setfield(L, -2, "collisions");
} else {
lua_newtable(L);
lua_setfield(L, -2, "collisions");
} else {
lua_newtable(L);