From 2a42d86692e7e75949c1219f18cd63250656e6d1 Mon Sep 17 00:00:00 2001 From: Harikrishnan Hariharan Date: Tue, 30 Aug 2016 02:13:29 +0530 Subject: [PATCH] msm8974-common: gps: Fix race condition when GPS app is closed around an SSR event Fix race condition to get avoid stuck in modem if GPS application is closed right around a SSR event.This fix will prevent resume the session once HAL loc_stop has been called. Change-Id: I4e5c3f09c097b835d8a685a8b465eb86dd06cd7a CRs-Fixed: 1058559 --- gps/loc_api/libloc_api_50001/loc_eng.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gps/loc_api/libloc_api_50001/loc_eng.cpp b/gps/loc_api/libloc_api_50001/loc_eng.cpp index 60e68ed..c18e02b 100644 --- a/gps/loc_api/libloc_api_50001/loc_eng.cpp +++ b/gps/loc_api/libloc_api_50001/loc_eng.cpp @@ -1978,7 +1978,6 @@ static int loc_eng_stop_handler(loc_eng_data_s_type &loc_eng_data) int ret_val = LOC_API_ADAPTER_ERR_SUCCESS; if (loc_eng_data.adapter->isInSession()) { - ret_val = loc_eng_data.adapter->stopFix(); loc_eng_data.adapter->setInSession(FALSE); } @@ -2862,7 +2861,7 @@ void loc_eng_handle_engine_up(loc_eng_data_s_type &loc_eng_data) if (loc_eng_data.adapter->isInSession()) { // This sets the copy in adapter to modem loc_eng_data.adapter->setInSession(false); - loc_eng_data.adapter->sendMsg(new LocEngStartFix(loc_eng_data.adapter)); + loc_eng_start_handler(loc_eng_data); } EXIT_LOG(%s, VOID_RET); }