Skip to content

Commit

Permalink
refa (AndroidFileUploader.java): onError() now returns generic error …
Browse files Browse the repository at this point in the history
…codes '-1' (old was: returning '0' as error codes which stood for 'ok' thus looking weird in the logs)
  • Loading branch information
ksidirop-laerdal committed Oct 18, 2024
1 parent b2b5fd8 commit 447f2c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public void onError(
{
if (!(exception instanceof McuMgrErrorException))
{
fatalErrorOccurredAdvertisement(remoteFilePath, errorMessage, 0, 0);
fatalErrorOccurredAdvertisement(remoteFilePath, errorMessage, -1, -1);
return;
}

Expand Down
8 changes: 4 additions & 4 deletions Laerdal.McuMgr/Droid/FileUploader/FileUploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ private void CleanupInfrastructure()
// ignored
}
}

public void CleanupResourcesOfLastUpload()
{
//nothing to do in android
}

#region commands

public EFileUploaderVerdict BeginUpload(
Expand Down Expand Up @@ -138,7 +138,7 @@ public bool TrySetBluetoothDevice(object bluetoothDevice)
}

#endregion commands



#region android callbacks -> csharp event emitters
Expand All @@ -149,7 +149,7 @@ public override void FatalErrorOccurredAdvertisement(string resource, string err

FatalErrorOccurredAdvertisement(resource, errorMessage, (EMcuMgrErrorCode) mcuMgrErrorCode, (EFileUploaderGroupReturnCode) fileUploaderGroupReturnCode);
}

public void FatalErrorOccurredAdvertisement(string resource, string errorMessage, EMcuMgrErrorCode mcuMgrErrorCode, EFileUploaderGroupReturnCode fileUploaderGroupReturnCode)
{
_fileUploaderCallbacksProxy?.FatalErrorOccurredAdvertisement(
Expand Down

0 comments on commit 447f2c7

Please sign in to comment.