}
case BLUETOOTH_EVENT_OPC_CONNECTED: {
INFO("BLUETOOTH_EVENT_OPC_CONNECTED, result [%d]", param->result);
+ ret_if(node == NULL);
+
send_index = 0;
is_started = FALSE;
is_tr_wait = true;
if (param->result != BLUETOOTH_ERROR_NONE) {
_bt_create_warning_popup(param->result,
BT_STR_UNABLE_TO_SEND);
- if (node != NULL && node->file_cnt > send_index) {
+ if (node->file_cnt > send_index) {
int *uids;
int uid_cnt = 0;
}
} else {
- if (node) {
- _bt_insert_instant_notification(BT_SENDING_NOTI);
+ _bt_insert_instant_notification(BT_SENDING_NOTI);
- if (ad->opc_noti) {
- _bt_delete_notification(ad->opc_noti);
- ad->opc_noti = NULL;
- ad->opc_noti_id = 0;
- }
-
- noti = _bt_insert_notification(ad,
- BT_SENDING_NOTI, node->name,
- node->addr, info->db_sid);
- ad->opc_noti = noti;
- ad->opc_noti_id = _bt_get_notification_priv_id(noti);
+ if (ad->opc_noti) {
+ _bt_delete_notification(ad->opc_noti);
+ ad->opc_noti = NULL;
+ ad->opc_noti_id = 0;
}
+
+ noti = _bt_insert_notification(ad,
+ BT_SENDING_NOTI, node->name,
+ node->addr, info->db_sid);
+ ad->opc_noti = noti;
+ ad->opc_noti_id = _bt_get_notification_priv_id(noti);
+
_bt_share_block_sleep(TRUE);
_bt_set_transfer_indicator(TRUE);
}
case BLUETOOTH_EVENT_OPC_TRANSFER_PROGRESS: {
client_info = (bt_opc_transfer_info_t *)param->param_data;
ret_if(client_info == NULL);
+ ret_if(node == NULL);
percentage = client_info->percentage;
name = strrchr(client_info->filename, '/');
case BLUETOOTH_EVENT_OPC_TRANSFER_COMPLETE: {
INFO("BLUETOOTH_EVENT_OPC_TRANSFER_COMPLETE");
+ ret_if(node == NULL);
if (!is_started) {
INFO("TRANSFER operation abnormal. It is completed without TRANSFER START");