{
int ret;
static int send_index = 0;
+ static gboolean is_started = FALSE;
int percentage = 0;
int s_id = 0;
char *name = NULL;
case BLUETOOTH_EVENT_OPC_CONNECTED:
INFO("BLUETOOTH_EVENT_OPC_CONNECTED, result [%d] \n", param->result);
send_index = 0;
+ is_started = FALSE;
if (param->result != BLUETOOTH_ERROR_NONE) {
_bt_create_warning_popup(param->result,
BT_STR_UNABLE_TO_SEND);
INFO("BLUETOOTH_EVENT_OPC_TRANSFER_STARTED");
ret_if(node == NULL);
+ is_started = TRUE;
+
if (ad->opc_noti) {
_bt_delete_notification(ad->opc_noti);
ad->opc_noti = NULL;
case BLUETOOTH_EVENT_OPC_TRANSFER_COMPLETE:
INFO("BLUETOOTH_EVENT_OPC_TRANSFER_COMPLETE");
+ if (!is_started) {
+ INFO("TRANSFER operation abnormal. It is completed without TRANSFER START");
+ info = (bt_tr_data_t *)(ad->tr_next_data)->data;
+ ret_if(info == NULL);
+ ad->current_tr_uid = info->id;
+ INFO("ad->current_tr_uid = [%d]", ad->current_tr_uid);
+ send_index++;
+ }
+
+ is_started = FALSE;
+
client_info = (bt_opc_transfer_info_t *)param->param_data;
ret_if(client_info == NULL);
BT_STR_UNABLE_TO_SEND);
ad->opp_transfer_abort = FALSE;
_bt_update_transfer_list_view("outbound");
+ ad->tr_next_data = g_slist_next(ad->tr_next_data);
break;
} else {
_bt_update_sent_data_status(ad->current_tr_uid,
break;
- case BLUETOOTH_EVENT_OPC_DISCONNECTED:
+ case BLUETOOTH_EVENT_OPC_DISCONNECTED:
INFO("BLUETOOTH_EVENT_OPC_DISCONNECTED");
ret_if(node == NULL);
if (node->file_cnt > send_index) {
send_index = 0;
+ is_started = FALSE;
+
if (!ad) {
ERR("ad is NULL");
break;
}
if (!ad->tr_next_data) {
send_index = 0;
+ is_started = FALSE;
_bt_share_block_sleep(FALSE);
_bt_set_transfer_indicator(FALSE);
_remove_transfer_info(node);
send_index = 0;
+ is_started = FALSE;
_bt_share_block_sleep(FALSE);
_bt_set_transfer_indicator(FALSE);
_remove_transfer_info(node);