git://developer.intra2net.com
/
libftdi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
cpp-wrapper: when using get-string-and-reopen method without having set up the usb...
[libftdi]
/
ftdipp
/
ftdi.cpp
diff --git
a/ftdipp/ftdi.cpp
b/ftdipp/ftdi.cpp
index
5e45dce
..
f1c1cef
100644
(file)
--- a/
ftdipp/ftdi.cpp
+++ b/
ftdipp/ftdi.cpp
@@
-316,6
+316,11
@@
int Context::get_strings()
int Context::get_strings_and_reopen()
{
+ if ( d->dev == 0 )
+ {
+ d->dev = libusb_get_device(d->ftdi->usb_dev);
+ }
+
// Get device strings (closes device)
int ret=get_strings();
if (ret < 0)