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 (!mSuccessFlag) {
if (mIsServer) { if (mIsServer) {
// Remove received file and inform gaia of receiving failure
DeleteReceivedFile(); DeleteReceivedFile();
} FileTransferComplete();
} else {
FileTransferComplete(); // Inform gaia of current blob transfer failure
if (!mIsServer) { if (mCurrentBlobIndex >= 0) {
FileTransferComplete();
}
// Inform gaia of remaining blobs' sending failure // Inform gaia of remaining blobs' sending failure
DiscardBlobsToSend(); DiscardBlobsToSend();
} }