return MSG_SUCCESS;
}
- const char* strDisplayName = contacts_svc_value_get_str(name, CTS_NAME_VAL_DISPLAY_STR);
const char* strFirstName = contacts_svc_value_get_str(name, CTS_NAME_VAL_FIRST_STR);
const char* strLastName = contacts_svc_value_get_str(name, CTS_NAME_VAL_LAST_STR);
- MSG_DEBUG("Display Name : [%s], First Name : [%s], Last Name : [%s]", strDisplayName, strFirstName, strLastName);
-
- if (strDisplayName != NULL)
- strncpy(pContactInfo->displayName, strDisplayName, MAX_DISPLAY_NAME_LEN);
+ MSG_DEBUG("First Name : [%s], Last Name : [%s]", strFirstName, strLastName);
if (strFirstName != NULL)
strncpy(pContactInfo->firstName, strFirstName, MAX_DISPLAY_NAME_LEN);
return MSG_SUCCESS;
}
- const char* strDisplayName = contacts_svc_value_get_str(name, CTS_NAME_VAL_DISPLAY_STR);
const char* strFirstName = contacts_svc_value_get_str(name, CTS_NAME_VAL_FIRST_STR);
const char* strLastName = contacts_svc_value_get_str(name, CTS_NAME_VAL_LAST_STR);
- MSG_DEBUG("Display Name : [%s], First Name : [%s], Last Name : [%s]", strDisplayName, strFirstName, strLastName);
-
- if (strDisplayName != NULL)
- strncpy(contactInfo.displayName, strDisplayName, MAX_DISPLAY_NAME_LEN);
+ MSG_DEBUG("First Name : [%s], Last Name : [%s]", strFirstName, strLastName);
if (strFirstName != NULL)
strncpy(contactInfo.firstName, strFirstName, MAX_DISPLAY_NAME_LEN);
// Add Address
memset(sqlQuery, 0x00, sizeof(sqlQuery));
- snprintf(sqlQuery, sizeof(sqlQuery), "INSERT INTO %s VALUES (%d, %d, %d, %d, '%s', %d, ?, ?, ?, '%s', 0);",
+ snprintf(sqlQuery, sizeof(sqlQuery), "INSERT INTO %s VALUES (%d, %d, %d, %d, '%s', %d, '', ?, ?, '%s', 0);",
MSGFW_ADDRESS_TABLE_NAME, addrId, *pConvId, pMsg->addressList[i].addressType, pMsg->addressList[i].recipientType, pMsg->addressList[i].addressVal,
contactInfo.contactId, contactInfo.imagePath);
if (pDbHandle->prepareQuery(sqlQuery) != MSG_SUCCESS)
return MSG_ERR_DB_PREPARE;
- pDbHandle->bindText(contactInfo.displayName, 1);
- pDbHandle->bindText(contactInfo.firstName, 2);
- pDbHandle->bindText(contactInfo.lastName, 3);
+ pDbHandle->bindText(contactInfo.firstName, 1);
+ pDbHandle->bindText(contactInfo.lastName, 2);
if (pDbHandle->stepQuery() != MSG_ERR_DB_DONE) {
pDbHandle->finalizeQuery();
memset(sqlQuery, 0x00, sizeof(sqlQuery));
snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET \
- CONTACT_ID = %d, DISPLAY_NAME = ?, FIRST_NAME = ?, LAST_NAME = ?, IMAGE_PATH = '%s' \
+ CONTACT_ID = %d, FIRST_NAME = ?, LAST_NAME = ?, IMAGE_PATH = '%s' \
WHERE ADDRESS_VAL LIKE '%%%%%s';",
MSGFW_ADDRESS_TABLE_NAME, pContactInfo->contactId, pContactInfo->imagePath, newPhoneNum);
} else {
memset(sqlQuery, 0x00, sizeof(sqlQuery));
snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET \
- CONTACT_ID = %d, DISPLAY_NAME = ?, FIRST_NAME = ?, LAST_NAME = ?, IMAGE_PATH = '%s' \
+ CONTACT_ID = %d, FIRST_NAME = ?, LAST_NAME = ?, IMAGE_PATH = '%s' \
WHERE ADDRESS_VAL = '%s';",
MSGFW_ADDRESS_TABLE_NAME, pContactInfo->contactId, pContactInfo->imagePath, pNumber);
}
if (pDbHandle->prepareQuery(sqlQuery) != MSG_SUCCESS)
return MSG_ERR_DB_PREPARE;
- pDbHandle->bindText(pContactInfo->displayName, 1);
+ pDbHandle->bindText(pContactInfo->firstName, 1);
- pDbHandle->bindText(pContactInfo->firstName, 2);
-
- pDbHandle->bindText(pContactInfo->lastName, 3);
+ pDbHandle->bindText(pContactInfo->lastName, 2);
if (pDbHandle->stepQuery() != MSG_ERR_DB_DONE) {
pDbHandle->finalizeQuery();