Bug 1055434 - Do not inform gaia of current blob's sending failure before assigning it, r=shuang

This commit is contained in:
Ben Tian 2015-08-18 17:31:41 +08:00
parent ab844d103e
commit 1c5283cf24

View File

@ -1551,11 +1551,14 @@ BluetoothOppManager::OnSocketDisconnect(BluetoothSocket* aSocket)
*/
if (!mSuccessFlag) {
if (mIsServer) {
// Remove received file and inform gaia of receiving failure
DeleteReceivedFile();
}
FileTransferComplete();
if (!mIsServer) {
FileTransferComplete();
} else {
// Inform gaia of current blob transfer failure
if (mCurrentBlobIndex >= 0) {
FileTransferComplete();
}
// Inform gaia of remaining blobs' sending failure
DiscardBlobsToSend();
}