mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
From 2ce2214fff9bfe8ecf2a15ec6d513f1cc143110a Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Thu, 2 May 2024 12:36:49 +0200
|
|
Subject: [PATCH] ubus: fix uc_ubus_have_uloop for eloop+uloop combination
|
|
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
---
|
|
..._have_uloop-for-eloop-uloop-combinat.patch | 26 +++++++++++++++++++
|
|
1 file changed, 26 insertions(+)
|
|
create mode 100644 package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch
|
|
|
|
diff --git a/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch b/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch
|
|
new file mode 100644
|
|
index 0000000000..a1659be3c8
|
|
--- /dev/null
|
|
+++ b/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch
|
|
@@ -0,0 +1,26 @@
|
|
+From: Felix Fietkau <nbd@nbd.name>
|
|
+Date: Wed, 1 May 2024 18:40:19 +0200
|
|
+Subject: [PATCH] ubus: fix uc_ubus_have_uloop for eloop+uloop combination
|
|
+
|
|
+When uloop has been integrated with eloop (in hostapd/wpa_supplicant),
|
|
+uloop_cancelling will return false, since uloop_run is not being called.
|
|
+This leads to ubus.defer() calling uloop_run in a context where it can
|
|
+prevent the other event loop from running.
|
|
+
|
|
+Fix this by detecting event loop integration via uloop_fd_set_cb being set
|
|
+
|
|
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
+---
|
|
+
|
|
+--- a/lib/ubus.c
|
|
++++ b/lib/ubus.c
|
|
+@@ -665,6 +665,9 @@ uc_ubus_have_uloop(void)
|
|
+ bool prev = uloop_cancelled;
|
|
+ bool active;
|
|
+
|
|
++ if (uloop_fd_set_cb)
|
|
++ return true;
|
|
++
|
|
+ uloop_cancelled = true;
|
|
+ active = uloop_cancelling();
|
|
+ uloop_cancelled = prev;
|
|
--
|
|
2.34.1
|
|
|