Merge "Handle SSR based on service list"
This commit is contained in:
commit
cc92e0ccd4
1 changed files with 13 additions and 14 deletions
|
@ -1727,21 +1727,21 @@ static locClientStatusEnumType locClientQmiCtrlPointInit(
|
||||||
// get the service addressing information
|
// get the service addressing information
|
||||||
rc = qmi_client_get_service_list(locClientServiceObject, NULL, NULL,
|
rc = qmi_client_get_service_list(locClientServiceObject, NULL, NULL,
|
||||||
&num_services);
|
&num_services);
|
||||||
/* If service is not up wait on a signal until the service is up
|
LOC_LOGV("%s:%d]: qmi_client_get_service_list() rc: %d "
|
||||||
* or a timeout occurs. */
|
"total timeout: %d", __func__, __LINE__, rc, timeout);
|
||||||
if (rc != QMI_NO_ERR) {
|
|
||||||
QMI_CCI_OS_SIGNAL_WAIT(&os_params, LOC_CLIENT_SERVICE_TIMEOUT_UNIT);
|
|
||||||
nosignal = QMI_CCI_OS_SIGNAL_TIMED_OUT(&os_params);
|
|
||||||
if (!nosignal)
|
|
||||||
rc = qmi_client_get_service_list(locClientServiceObject, NULL, NULL,
|
|
||||||
&num_services);
|
|
||||||
}
|
|
||||||
|
|
||||||
timeout += LOC_CLIENT_SERVICE_TIMEOUT_UNIT;
|
if(rc == QMI_NO_ERR)
|
||||||
|
break;
|
||||||
|
|
||||||
LOC_LOGV("%s:%d]: qmi_client_get_service_list() rc %d, nosignal %d, "
|
/* Service is not up. Wait on a signal until the service is up
|
||||||
"total timeout %d", __func__, __LINE__, rc, nosignal, timeout);
|
or a timeout occurs. */
|
||||||
} while (timeout < LOC_CLIENT_SERVICE_TIMEOUT_TOTAL && nosignal && rc != QMI_NO_ERR);
|
LOC_LOGD("%s:%d]: Service not up. Starting delay timer\n", __func__, __LINE__);
|
||||||
|
QMI_CCI_OS_SIGNAL_WAIT(&os_params, LOC_CLIENT_SERVICE_TIMEOUT_UNIT);
|
||||||
|
nosignal = QMI_CCI_OS_SIGNAL_TIMED_OUT(&os_params);
|
||||||
|
if(nosignal)
|
||||||
|
timeout += LOC_CLIENT_SERVICE_TIMEOUT_UNIT;
|
||||||
|
|
||||||
|
} while (timeout < LOC_CLIENT_SERVICE_TIMEOUT_TOTAL);
|
||||||
|
|
||||||
if (0 == num_services || rc != QMI_NO_ERR) {
|
if (0 == num_services || rc != QMI_NO_ERR) {
|
||||||
if (!nosignal) {
|
if (!nosignal) {
|
||||||
|
@ -2209,4 +2209,3 @@ bool locClientGetSizeByEventIndId(uint32_t eventIndId, size_t *pEventIndSize)
|
||||||
// not found
|
// not found
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue