mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
#1456 Resolves issue with shutdown when no sdrplay api is available. Version update to 0.6.0 alpha-2 (#1457)
Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
@@ -561,21 +561,28 @@ public class SDRplay
|
||||
*/
|
||||
public Status close()
|
||||
{
|
||||
Status closeStatus;
|
||||
|
||||
try
|
||||
if(mSdrplayLibraryLoaded)
|
||||
{
|
||||
closeStatus = Status.fromValue(sdrplay_api_h.sdrplay_api_Close());
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
closeStatus = Status.FAIL;
|
||||
mLog.error("Error closing SDRPlay API", e);
|
||||
}
|
||||
Status closeStatus;
|
||||
|
||||
mSdrplayLibraryLoaded = false;
|
||||
mAvailable = false;
|
||||
return closeStatus;
|
||||
try
|
||||
{
|
||||
closeStatus = Status.fromValue(sdrplay_api_h.sdrplay_api_Close());
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
closeStatus = Status.FAIL;
|
||||
mLog.error("Error closing SDRPlay API", e);
|
||||
}
|
||||
|
||||
mSdrplayLibraryLoaded = false;
|
||||
mAvailable = false;
|
||||
return closeStatus;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Status.API_UNAVAILABLE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user