USB Host WAN Dongle library
Fork of USBHostWANDongle_bleedingedge by
Diff: USB3GModule/WANDongle.cpp
- Revision:
- 11:a0841fba0599
- Parent:
- 10:08bce4cd973a
- Child:
- 13:c154e7f2e42f
--- a/USB3GModule/WANDongle.cpp Thu Aug 30 09:15:55 2012 +0000 +++ b/USB3GModule/WANDongle.cpp Thu Aug 30 14:13:24 2012 +0000 @@ -60,10 +60,20 @@ m_pInitializer = NULL; //Will be set in setVidPid callback DBG("Found one device reset it"); - host->resetDevice(dev); + int ret = host->resetDevice(dev); + if(ret) + { + host->unlock(); + return false; + } DBG("Enumerate"); - host->enumerate(dev, this); + ret = host->enumerate(dev, this); + if(ret) + { + host->unlock(); + return false; + } DBG("Device has VID:%04x PID:%04x", dev->getVid(), dev->getPid());