diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-08-01 14:08:25 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-08-01 14:08:25 +0300 |
| commit | 27dbf81a7375ccb352a35261c6c9ee3aa3fcb98f (patch) | |
| tree | 0c377d26302532372422c852c80583191bc63d0e /bgpd/bgp_script.c | |
| parent | fbedeb958fae765fe719a76d0ea53792512f9044 (diff) | |
lib: Do not use time_t as a special Lua encoder/decoder
This is purely an integer (long long/long), and causes issues for 32-bit systems.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_script.c')
| -rw-r--r-- | bgpd/bgp_script.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_script.c b/bgpd/bgp_script.c index f4ab233524..68df175c18 100644 --- a/bgpd/bgp_script.c +++ b/bgpd/bgp_script.c @@ -30,11 +30,11 @@ void lua_pushpeer(lua_State *L, const struct peer *peer) lua_setfield(L, -2, "state"); lua_pushstring(L, peer->desc ? peer->desc : ""); lua_setfield(L, -2, "description"); - lua_pushtimet(L, &peer->uptime); + lua_pushinteger(L, peer->uptime); lua_setfield(L, -2, "uptime"); - lua_pushtimet(L, &peer->readtime); + lua_pushinteger(L, peer->readtime); lua_setfield(L, -2, "last_readtime"); - lua_pushtimet(L, &peer->resettime); + lua_pushinteger(L, peer->resettime); lua_setfield(L, -2, "last_resettime"); lua_pushsockunion(L, peer->su_local); lua_setfield(L, -2, "local_address"); |
