ubus: expose remaining session lifetime in ubus session.list call
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 22 Jan 2013 14:55:29 +0000 (15:55 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 22 Jan 2013 14:55:29 +0000 (15:55 +0100)
ubus-session.c

index ddac28be78fd5c96734de166bac6ccf12c74efb7..e590d9c4bef10d228a9e6c5741b9fc1e8043e796 100644 (file)
@@ -144,6 +144,7 @@ uh_ubus_session_dump(struct uh_ubus_session *ses,
 
        blobmsg_add_string(&buf, "sid", ses->id);
        blobmsg_add_u32(&buf, "timeout", ses->timeout);
+       blobmsg_add_u32(&buf, "expires", uloop_timeout_pending(&ses->t) / 1000);
 
        c = blobmsg_open_table(&buf, "acls");
        uh_ubus_session_dump_acls(ses, &buf);