[PATCH] ubus/lua: avoid changing key type to string

2021-08-31 Thread adrian . frances
From: Adrian Frances According to the lua man page for lua_next, it is not advised to call lua_tolstring when iterating through a table with lua_next. When iterating a table in ubus_lua_format_blob_array, we end up calling lua_tostring, which inside calls lua_tolstring, converting all non

[PATCH v2] ubusd: fix disconnection when sending invalid fd

2021-08-31 Thread adrian . frances
From: Adrian Frances According to man 7 unix, sendmsg returns EBADF when sending an invalid file descriptor as ancillary data. The patch avois ubus disconnecting the client when EBADF is received for the mentioned case. Signed-off-by: Adrian Frances --- ubusd_main.c | 7 +++ 1 file

[PATCH] ubusd: fix disconnection when sending invalid fd

2021-08-17 Thread adrian . frances
From: Adrian Frances According to man 7 unix, sendmsg returns EBADF when sending an invalid file descriptor as ancillary data. The patch avois ubus disconnecting the client when EBADF is received for the mentioned case. Signed-off-by: Adrian Frances --- ubusd_main.c | 6 ++ 1 file changed

[PATCH] ubus/lua: add support for custom timeout parameter on call

2021-08-17 Thread adrian . frances
From: Adrian Frances Allows for setting different timeouts per call, using the general timeout for the ubus connection as the fallback. Signed-off-by: Adrian Frances --- lua/ubus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/ubus.c b/lua/ubus.c index e2bb081