err = msg_set_int_value(folder_info, MSG_FOLDER_INFO_TYPE_INT,
MSG_FOLDER_TYPE_USER_DEF);
if (err != MSG_SUCCESS) {
+ /* LCOV_EXCL_START */
ERR("Failed adding type %d", err);
msg_release_struct(&folder_info);
return;
+ /* LCOV_EXCL_STOP */
}
err = msg_set_str_value(folder_info, MSG_FOLDER_INFO_NAME_STR,
"DELETED", MAX_FOLDER_NAME_SIZE);
if (err != MSG_SUCCESS) {
+ /* LCOV_EXCL_START */
ERR("Failed adding str %d", err);
msg_release_struct(&folder_info);
return;
+ /* LCOV_EXCL_STOP */
}
err = msg_add_folder(g_msg_handle, folder_info);
if (err != MSG_SUCCESS) {
+ /* LCOV_EXCL_START */
ERR("Failed adding folder %d", err);
msg_release_struct(&folder_info);
return;
+ /* LCOV_EXCL_STOP */
}
msg_release_struct(&folder_info);
FN_END;
}
+/* LCOV_EXCL_START */
static void __bluetooth_map_msg_incoming_status_cb(msg_handle_t handle,
msg_struct_t msg,
void *user_param)
FN_END;
}
+/* LCOV_EXCL_STOP */
gboolean _bt_map_sms_get_supported_folders(gboolean folders[FOLDER_COUNT][MSG_TYPES])
{
goto done;
}
+ /* LCOV_EXCL_START */
if (msg_get_folder_list(g_msg_handle, &folder_list) != MSG_SUCCESS) {
msg_ret = FALSE;
goto done;
DBG("DELETED");
}
}
+ /* LCOV_EXCL_STOP */
done:
if (folder_list.msg_struct_info)
- msg_release_list_struct(&folder_list);
+ msg_release_list_struct(&folder_list); /* LCOV_EXCL_LINE */
FN_END;
return msg_ret;
return TRUE;
}
-
+/* LCOV_EXCL_START */
static gchar *__bt_get_sms_folder_name(int id)
{
FN_START;
else
return g_strdup_printf("TELECOM/MSG/%s", folder_name);
}
+/* LCOV_EXCL_STOP */
gboolean _bt_map_set_sms_delete_status(int msg_id, gboolean delete_status)
{
if (msg_id == -1)
goto fail;
+ /* LCOV_EXCL_START */
if (g_msg_handle == NULL)
goto fail;
FN_END;
return TRUE;
+ /* LCOV_EXCL_STOP */
fail:
g_free(folder_name);
return FALSE;
}
+/* LCOV_EXCL_START */
static msg_error_t __bt_send_sms(int msg_id, msg_struct_t p_msg, msg_struct_t p_send_opt)
{
FN_START;
msg_body, BT_MAP_MSG_BODY_MAX);
if (ret == MSG_SUCCESS) {
int msg_pdu_len = 0;
- msg_pdu = __bt_get_sms_pdu_from_msg_data(addr_value,
+ msg_pdu = _bt_get_sms_pdu_from_msg_data(addr_value,
msg_body, dptime,
&msg_pdu_len);
if (msg_pdu) {
FN_END;
return g_string_free(msg, FALSE);
}
+/* LCOV_EXCL_STOP */
gboolean _bt_map_get_sms_message(int message_id, gboolean attach,
gboolean transcode, gboolean first_request, gchar **bmseg)
if (!msg)
goto fail;
+ /* LCOV_EXCL_START */
send_opt = msg_create_struct(MSG_STRUCT_SENDOPT);
if (!send_opt)
goto fail;
FN_END;
return TRUE;
+ /* LCOV_EXCL_STOP */
fail:
if (msg)
- msg_release_struct(&msg);
+ msg_release_struct(&msg); /* LCOV_EXCL_LINE */
if (send_opt)
- msg_release_struct(&send_opt);
+ msg_release_struct(&send_opt); /* LCOV_EXCL_LINE */
ERR("Unable to Get SMS Message");
return FALSE;
}
+/* LCOV_EXCL_START */
static char *__bt_get_truncated_utf8_string(char *src)
{
FN_START;
while (count > 0 && ((i + count) < sizeof(dest))) {
dest[i++] = *p;
p++;
- count --;
+ count--;
}
p = next;
}
msg_struct_t addr_info = NULL;
ret = msg_get_int_value(msg_struct_handle, MSG_MESSAGE_ID_INT, &msg_id);
- if (ret != MSG_SUCCESS) {
+ if (ret != MSG_SUCCESS)
ERR("Could not get Message ID");
- }
uid = _bt_add_id(msg_id, BT_MAP_ID_SMS);
#ifdef ARCH64
ret = msg_get_int_value(msg_struct_handle,
MSG_MESSAGE_DISPLAY_TIME_INT, (int *)&dptime);
- if (ret == MSG_SUCCESS) {
+ if (ret == MSG_SUCCESS)
_get_msg_timestamp(&dptime, msg_datetime);
- }
+
DBG("Got date time: %s", msg_datetime);
msg_info->datetime = g_strdup(msg_datetime);
ret = msg_get_int_value(msg_struct_handle, MSG_MESSAGE_TYPE_INT,
&m_type);
- if (ret == MSG_SUCCESS) {
+ if (ret == MSG_SUCCESS)
DBG("m_type %d\n", m_type);
- }
msg_info->type = g_strdup("SMS_GSM");
ERR("Getting SMS List Failed");
return FALSE;
}
+/* LCOV_EXCL_STOP */
void _bt_map_stop_sms_service(void)
{
if (folder_id != -1) {
err = msg_delete_folder(g_msg_handle, folder_id);
if (err != MSG_SUCCESS)
- ERR("Delete folder failed");
+ ERR("Delete folder failed"); /* LCOV_EXCL_LINE */
}
if (g_msg_handle) {
err = msg_open_msg_handle(&g_msg_handle);
if (err != MSG_SUCCESS) {
+ /* LCOV_EXCL_START */
ERR("msg_open_msg_handle error = %d\n", err);
return FALSE;
+ /* LCOV_EXCL_STOP */
}
if (__bt_get_sms_folder_id(BT_MAP_DELETED_FOLDER_NAME) == -1)
__bluetooth_map_msg_incoming_status_cb,
0, (void *)BT_MAP_MSG_CB);
if (err != MSG_SUCCESS) {
+ /* LCOV_EXCL_START */
ERR("msg_reg_sms_message_callback error = %d\n", err);
return FALSE;
+ /* LCOV_EXCL_STOP */
}
err = msg_reg_sent_status_callback(g_msg_handle,
__bluetooth_map_msg_sent_status_cb,
NULL);
if (err != MSG_SUCCESS) {
+ /* LCOV_EXCL_START */
ERR("msg_reg_sent_status_callback error = %d\n", err);
return FALSE;
+ /* LCOV_EXCL_STOP */
}
FN_END;