libftdi Archives

Subject: libusb_init and libusb_exit in libftdi-1.0

From: David Wiberg <dwiberg@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sun, 22 May 2011 12:32:27 +0200
Hello,

I'm a new user of the libftdi-1.0 library and I have stumbled upon a
problem. I have a small test application which does a ftdi_init and
then a ftdi_deinit and the second call causes a segfault. The reason
seems to be that libusb_exit is called in ftdi_deinit but libusb_init
is only called in ftdi_usb_open_desc_index and ftdi_usb_find_all.

My naive suggestion is to initialize libusb in ftdi_init but I don't
know if this causes other problems.

Regards
David

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread