From: Peter Schneider Date: Tue, 3 Jan 2012 09:44:55 +0000 (+0100) Subject: Fixes the three open methods of the cpp wrapper that do not get an usb-device paramet... X-Git-Tag: v0.20~2 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=80d3cf70870aa4d1c8125bdf7ca00552b8a1ab57 Fixes the three open methods of the cpp wrapper that do not get an usb-device parameter as they have never really worked yet. --- diff --git a/ftdipp/ftdi.cpp b/ftdipp/ftdi.cpp index 8511a91..5868405 100644 --- a/ftdipp/ftdi.cpp +++ b/ftdipp/ftdi.cpp @@ -85,6 +85,8 @@ int Context::open(int vendor, int product) if (ret < 0) return ret; + d->dev = usb_device(d->ftdi->usb_dev); + return get_strings_and_reopen(); } @@ -104,6 +106,8 @@ int Context::open(int vendor, int product, const std::string& description, const if (ret < 0) return ret; + d->dev = usb_device(d->ftdi->usb_dev); + return get_strings_and_reopen(); } @@ -114,6 +118,8 @@ int Context::open(const std::string& description) if (ret < 0) return ret; + d->dev = usb_device(d->ftdi->usb_dev); + return get_strings_and_reopen(); }