Home | History | Annotate | Download | only in libloc_api_50001

Lines Matching defs:pSession

119     loc_eng_ni_session_s_type* pSession = NULL;
134 pSession = &loc_eng_ni_data_p->sessionEs;
145 pSession = &loc_eng_ni_data_p->session;
150 if (pSession) {
152 pSession->rawRequest = (void*)passThrough;
153 pSession->reqID = ++loc_eng_ni_data_p->reqIDCounter;
154 pSession->adapter = loc_eng_data.adapter;
157 ((GpsNiNotification*)notif)->notification_id = pSession->reqID;
176 pSession->respTimeLeft = 5 + (notif->timeout != 0 ? notif->timeout : LOC_NI_NO_RESPONSE_TIME);
177 LOC_LOGI("Automatically sends 'no response' in %d seconds (to clear status)\n", pSession->respTimeLeft);
180 rc = pthread_create(&pSession->thread, NULL, ni_thread_proc, pSession);
185 rc = pthread_detach(pSession->thread);
206 loc_eng_ni_session_s_type* pSession = (loc_eng_ni_session_s_type*)args;
213 pthread_mutex_lock(&pSession->tLock);
216 expire_time.tv_sec = present_time.tv_sec + pSession->respTimeLeft;
219 (long) expire_time.tv_sec, pSession->respTimeLeft );
221 while (!pSession->respRecvd)
223 rc = pthread_cond_timedwait(&pSession->tCond,
224 &pSession->tLock,
228 pSession->resp = GPS_NI_RESPONSE_NORESP;
235 pSession->respRecvd = FALSE; /* Reset the user response flag for the next session*/
237 LOC_LOGD("pSession->resp is %d\n",pSession->resp);
242 LocEngAdapter* adapter = pSession->adapter;
245 if (NULL != pSession->rawRequest) {
246 if (pSession->resp != GPS_NI_RESPONSE_IGNORE) {
247 LOC_LOGD("pSession->resp != GPS_NI_RESPONSE_IGNORE \n");
249 pSession->resp,
250 pSession->rawRequest);
253 free(pSession->rawRequest);
255 pSession->rawRequest = NULL;
257 pthread_mutex_unlock(&pSession->tLock);
259 pSession->respTimeLeft = 0;
260 pSession->reqID = 0;
377 loc_eng_ni_session_s_type* pSession = NULL;
386 pSession = &loc_eng_ni_data_p->sessionEs;
398 pSession = &loc_eng_ni_data_p->session;
401 if (pSession) {
403 pthread_mutex_lock(&pSession->tLock);
404 pSession->resp = user_response;
405 pSession->respRecvd = TRUE;
406 pthread_cond_signal(&pSession->tCond);
407 pthread_mutex_unlock(&pSession->tLock);