case BLUETOOTH_EVENT_OPC_TRANSFER_PROGRESS:
BT_INFO("bt_opp_client_transfer_in_progress_cb() will be called");
client_info = (bt_opc_transfer_info_t *)(param->param_data);
- ((bt_opp_client_push_progress_cb)bt_event_slot_container[event_index].callback)
- (client_info->filename, client_info->size, client_info->percentage, bt_event_slot_container[event_index].user_data);
+
+ /* Progress 100% event will be invoked by BLUETOOTH_EVENT_OPC_TRANSFER_COMPLETE*/
+ if (client_info->percentage != 100)
+ ((bt_opp_client_push_progress_cb)bt_event_slot_container[event_index].callback)
+ (client_info->filename, client_info->size, client_info->percentage, bt_event_slot_container[event_index].user_data);
break;
case BLUETOOTH_EVENT_OPC_TRANSFER_COMPLETE:
BT_INFO("BLUETOOTH_EVENT_OPC_TRANSFER_COMPLETE");
- /* This event don't be used in CAPI */
+ client_info = (bt_opc_transfer_info_t *)(param->param_data);
+
+ if (param->result == BLUETOOTH_ERROR_NONE)
+ ((bt_opp_client_push_progress_cb)bt_event_slot_container[event_index].callback)
+ (client_info->filename, client_info->size, 100, bt_event_slot_container[event_index].user_data);
break;
case BLUETOOTH_EVENT_MAP_CONNECTED: