OSDN Git Service

Do not call rilc_thread_pool if there is no ril library
authorRoman Kiryanov <rkir@google.com>
Wed, 20 Mar 2019 23:06:18 +0000 (16:06 -0700)
committerRoman Kiryanov <rkir@google.com>
Wed, 20 Mar 2019 23:35:32 +0000 (16:35 -0700)
rilc_thread_pool crashes if RIL_register is never called
because RIL_register sets the threadpool which
rilc_thread_pool joins to.

Test: make
Bug: 117327079
Change-Id: If249561375748d42f1b8593ac9794fdfa1b76d18
Signed-off-by: Roman Kiryanov <rkir@google.com>
rild/rild.c

index c554a9f..781db78 100644 (file)
@@ -224,10 +224,9 @@ int main(int argc, char **argv) {
 
     RLOGD("RIL_register_socket completed");
 
-done:
-
     rilc_thread_pool();
 
+done:
     RLOGD("RIL_Init starting sleep loop");
     while (true) {
         sleep(UINT32_MAX);