aboutsummaryrefslogtreecommitdiffstats
path: root/cphidgetmanager.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cphidgetmanager.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cphidgetmanager.c b/cphidgetmanager.c
index eecdb04..d0f918b 100644
--- a/cphidgetmanager.c
+++ b/cphidgetmanager.c
@@ -125,6 +125,7 @@ int CPhidgetDetachEvent(CPhidgetHandle phid) {
travPhid->fptrDetach((CPhidgetHandle)travPhid, travPhid->fptrDetachptr);
travPhid->deviceIDSpec = 0;
+ travPhid->deviceUID = 0;
#if !defined(_MACOSX) && !defined(WINCE)
CPhidgetFHandle_free(travPhid->CPhidgetFHandle);
@@ -298,6 +299,10 @@ int CCONV CPhidgetManager_close(CPhidgetManagerHandle phidm)
if(!ActiveDevices && !ActivePhidgetManagers)
{
JoinCentralThread();
+ //Shut down USB
+#if defined(_LINUX) && !defined(_ANDROID)
+ CUSBUninit();
+#endif
}
CPhidget_clearStatusFlag(&phidm->status, PHIDGET_OPENED_FLAG, &phidm->lock);