int flags;
if ( (flags = fcntl(m_socketFd, F_GETFL, 0)) == -1 )
flags = 0;
- fcntl(m_socketFd, F_SETFL, flags | O_NONBLOCK);
- TryReturn( m_socketFd != -1, PRIV_GUARD_ERROR_IPC_ERROR, , "fcntl : %s", strerror_r(errno, buf, sizeof(buf)));
+ res = fcntl(m_socketFd, F_SETFL, flags | O_NONBLOCK);
+ TryReturn( res != -1, PRIV_GUARD_ERROR_IPC_ERROR, , "fcntl : %s", strerror_r(errno, buf, sizeof(buf)));
bzero(&remote, sizeof(remote));
remote.sun_family = AF_UNIX;
DlpPrivacyInfoData::loadInfo(const int userId)
{
char *ipv4 = NULL, *imei = NULL, *phoneno = NULL, *mac;
- int ret;
if (m_connection && m_ipv4.empty()) {
- ret = connection_get_ip_address(m_connection, CONNECTION_ADDRESS_FAMILY_IPV4, &ipv4);
- if (ret == CONNECTION_ERROR_NONE) {
+ int ret_connection = connection_get_ip_address(m_connection, CONNECTION_ADDRESS_FAMILY_IPV4, &ipv4);
+ if (CONNECTION_ERROR_NONE == ret_connection) {
m_ipv4 = ipv4;
free(ipv4);
}
if (m_handle_list.handle == NULL && telephony_init(&m_handle_list) == TELEPHONY_ERROR_NONE) {
for (unsigned int i = 0; i < m_handle_list.count; i++) {
if (waitForModemReady(m_handle_list.handle[i])) {
- ret = telephony_modem_get_imei(m_handle_list.handle[i], &imei);
- if (ret == TELEPHONY_ERROR_NONE && imei && strlen(imei))
+ int ret_telephony = telephony_modem_get_imei(m_handle_list.handle[i], &imei);
+ if (TELEPHONY_ERROR_NONE == ret_telephony && imei && strlen(imei))
m_imei_list.push_back(imei);
} else {
PG_LOGE("Modem is not ready. IMEI can not be monitored.");
}
- ret = telephony_sim_get_subscriber_number(m_handle_list.handle[i], &phoneno);
- if (ret == TELEPHONY_ERROR_NONE && phoneno && strlen(phoneno))
+ int ret_telephony = telephony_sim_get_subscriber_number(m_handle_list.handle[i], &phoneno);
+ if (TELEPHONY_ERROR_NONE == ret_telephony && phoneno && strlen(phoneno))
m_sim_phoneno_list.insert(phoneno);
// Tracking SIM status: Phone number may not be available after power up
// Loading my profile infos
if (m_myprofile_watch == false) {
- ret = contacts_connect();
- if (ret == CONTACTS_ERROR_NONE) {
+ int ret_contacts = contacts_connect();
+ if (CONTACTS_ERROR_NONE == ret_contacts) {
loadMyProfile();
m_myprofile_watch = true;
contacts_db_add_changed_cb(_contacts_my_profile._uri,
- myProfileChanged, this);
+ myProfileChanged, this);
}
}
}