summaryrefslogtreecommitdiffhomepage
path: root/src/ubus.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-26 14:26:37 +0200
committerJo-Philipp Wich <jo@mein.io>2018-07-26 14:26:37 +0200
commit44cce3169a961727b1f046b786e7995ffb26a957 (patch)
tree580e33c9df1b8818ebdbbc1aef393fe34f8b4ea7 /src/ubus.c
parent345bba0889ae9deeac4ca805ebc3f0661b4b3988 (diff)
ubus: avoid dumping interface state with NULL message
Invoking ubus methods with NULL message is not supported anymore, so make sure that network.interface/dump is called with an empty blob buffer argument. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'src/ubus.c')
-rw-r--r--src/ubus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ubus.c b/src/ubus.c
index 973ae5a..5be6bbe 100644
--- a/src/ubus.c
+++ b/src/ubus.c
@@ -225,7 +225,9 @@ static void update_netifd(bool subscribe)
ubus_subscribe(ubus, &netifd, objid);
ubus_abort_request(ubus, &req_dump);
- if (!ubus_invoke_async(ubus, objid, "dump", NULL, &req_dump)) {
+ blob_buf_init(&b, 0);
+
+ if (!ubus_invoke_async(ubus, objid, "dump", b.head, &req_dump)) {
req_dump.data_cb = handle_dump;
ubus_complete_request_async(ubus, &req_dump);
}