summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--lib/ubus.c36
2 files changed, 0 insertions, 37 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b7e412..d7e7006 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,7 +180,6 @@ if(UBUS_SUPPORT)
try_compile(HAVE_NEW_UBUS_STATUS_CODES
${CMAKE_BINARY_DIR}
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test.c")
- check_symbol_exists(uloop_fd_set_cb "libubox/uloop.h" FD_SET_CB_EXISTS)
check_function_exists(uloop_timeout_remaining64 REMAINING64_FUNCTION_EXISTS)
check_function_exists(ubus_channel_connect HAVE_CHANNEL_SUPPORT)
if(REMAINING64_FUNCTION_EXISTS)
diff --git a/lib/ubus.c b/lib/ubus.c
index 73b4e24..a2eb57e 100644
--- a/lib/ubus.c
+++ b/lib/ubus.c
@@ -134,9 +134,6 @@ static uc_resource_type_t *defer_type;
static uc_resource_type_t *conn_type;
static uc_resource_type_t *chan_type;
-static uint64_t n_cb_active;
-static bool have_own_uloop;
-
static struct blob_buf buf;
typedef struct {
@@ -651,11 +648,6 @@ uc_ubus_call_user_cb(uc_ubus_deferred_t *defer, int ret, uc_value_t *reply)
}
request_reg_clear(defer->vm, defer->registry_index);
-
- n_cb_active--;
-
- if (have_own_uloop && n_cb_active == 0)
- uloop_end();
}
static void
@@ -740,24 +732,6 @@ uc_ubus_call_timeout_cb(struct uloop_timeout *timeout)
uc_ubus_call_user_cb(defer, UBUS_STATUS_TIMEOUT, NULL);
}
-static bool
-uc_ubus_have_uloop(void)
-{
- bool prev = uloop_cancelled;
- bool active;
-
-#ifdef HAVE_ULOOP_FD_SET_CB
- if (uloop_fd_set_cb)
- return true;
-#endif
-
- uloop_cancelled = true;
- active = uloop_cancelling();
- uloop_cancelled = prev;
-
- return active;
-}
-
static int
get_fd(uc_vm_t *vm, uc_value_t *val)
{
@@ -1000,11 +974,6 @@ uc_ubus_defer_common(uc_vm_t *vm, uc_ubus_connection_t *c, uc_ubus_call_res_t *r
defer->registry_index = request_reg_add(vm, ucv_get(res->res), ucv_get(replycb), ucv_get(datacb),
ucv_get(fdcb), ucv_get(conn), ucv_get(fd));
-
- if (!uc_ubus_have_uloop()) {
- have_own_uloop = true;
- uloop_run();
- }
}
else {
uc_vm_stack_push(vm, ucv_get(replycb));
@@ -2347,11 +2316,6 @@ uc_ubus_defer_abort(uc_vm_t *vm, size_t nargs)
request_reg_clear((*d)->vm, (*d)->registry_index);
- n_cb_active--;
-
- if (have_own_uloop && n_cb_active == 0)
- uloop_end();
-
(*d)->complete = true;
ok_return(ucv_boolean_new(true));