Restore early AIDL initialization if the
-B daemonize option is not being used.
AIDL initialization was moved in ag/22511957,
but this causes issues if interfaces are added
before the delayed AIDL initialization.
Bug: 285101633
Test: Manual test - enable and disable the -B
daemonize option. Check that AIDL is
initialized at the right time for each case.
Change-Id: I6ba6dc0e6ae3d4ba7b42a0998fe9b0f3f72f82d7
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 99ecef8..287bc9e 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -7920,9 +7920,12 @@
}
#ifdef CONFIG_AIDL
- global->aidl = wpas_aidl_init(global);
- if (!global->aidl)
- return -1;
+ // If daemonize is enabled, initialize AIDL here.
+ if (global->params.daemonize) {
+ global->aidl = wpas_aidl_init(global);
+ if (!global->aidl)
+ return -1;
+ }
#endif /* CONFIG_AIDL */
eloop_register_signal_terminate(wpa_supplicant_terminate, global);