Return the correct value from loc_eng_init

The function was returning an error code
which was causing GPSLocationProvider to
fail initialization

CRs-fixed: 501318
Change-Id: Icec707c3b9edc60bd07914b130077f9a96c5e794
This commit is contained in:
Tushar Janefalkar 2013-06-18 11:06:27 -07:00
parent 4ff37ed47f
commit c3f16206d7

View file

@ -290,11 +290,12 @@ int loc_eng_init(loc_eng_data_s_type &loc_eng_data, LocCallbacks* callbacks,
void (*loc_external_msg_sender) (void*, void*)) void (*loc_external_msg_sender) (void*, void*))
{ {
int ret_val =-1; int ret_val = 0;
ENTRY_LOG_CALLFLOW(); ENTRY_LOG_CALLFLOW();
if (NULL == callbacks || 0 == event) { if (NULL == callbacks || 0 == event) {
LOC_LOGE("loc_eng_init: bad parameters cb %p eMask %d", callbacks, event); LOC_LOGE("loc_eng_init: bad parameters cb %p eMask %d", callbacks, event);
ret_val = -1;
EXIT_LOG(%d, ret_val); EXIT_LOG(%d, ret_val);
return ret_val; return ret_val;
} }
@ -1931,13 +1932,14 @@ static void loc_eng_deferred_action_thread(void* arg)
} }
else else
LOC_LOGE("Ulp Phone context request call back not initialized"); LOC_LOGE("Ulp Phone context request call back not initialized");
} }
break; break;
case LOC_ENG_MSG_LOC_INIT: case LOC_ENG_MSG_LOC_INIT:
{ {
loc_eng_reinit(*loc_eng_data_p); loc_eng_reinit(*loc_eng_data_p);
} }
break;
default: default:
LOC_LOGE("unsupported msgid = %d\n", msg->msgid); LOC_LOGE("unsupported msgid = %d\n", msg->msgid);