Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openwrt/luci.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-11-03 21:53:05 +0300
committerJo-Philipp Wich <jo@mein.io>2019-11-03 21:57:14 +0300
commitaf88f9a006b23f3ec0e559b1192570930ec648b5 (patch)
treecbbf3ef37028a3432eb394ffc08c068f4eb80b46 /libs
parenteb808d0e9f9fb43ee9312bfee22d8fcaa3a69b06 (diff)
rpcd-mod-luci: properly deal with failing ubus requests
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'libs')
-rw-r--r--libs/rpcd-mod-luci/Makefile2
-rw-r--r--libs/rpcd-mod-luci/src/luci.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/libs/rpcd-mod-luci/Makefile b/libs/rpcd-mod-luci/Makefile
index 01b581d240..51e311e7f3 100644
--- a/libs/rpcd-mod-luci/Makefile
+++ b/libs/rpcd-mod-luci/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rpcd-mod-luci
-PKG_VERSION:=20191102
+PKG_VERSION:=20191103
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=Apache-2.0
diff --git a/libs/rpcd-mod-luci/src/luci.c b/libs/rpcd-mod-luci/src/luci.c
index 91f6798d79..12a22c8891 100644
--- a/libs/rpcd-mod-luci/src/luci.c
+++ b/libs/rpcd-mod-luci/src/luci.c
@@ -83,6 +83,8 @@ invoke_data_cb(struct ubus_request *req, int type, struct blob_attr *msg)
if (ictx->cb != NULL)
ictx->cb(req, type, msg);
+
+ ictx->cb = NULL;
}
static void
@@ -91,6 +93,9 @@ invoke_done_cb(struct ubus_request *req, int ret)
struct invoke_context *ictx =
container_of(req, struct invoke_context, request);
+ if (ictx->cb != NULL)
+ ictx->cb(req, -1, NULL);
+
uloop_timeout_cancel(&ictx->timeout);
free(ictx);
}