libftdi Archives

Subject: Crash on unplug

From: Tim Schneider <schneid5@xxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sun, 23 Jan 2011 17:02:16 +0100
Hello,

after I was helped here really quick with my last problem, I'm hoping you guys 
can also help me with this:

When I have a ftdi device connected and I'm reading data from it via libftdi, 
the program crashes if I just unplug the device. Of course one should never do 
that but I thought, the ftdi_read_data call would return some kind of error 
code if it did happen. Unfortunately it doesn't.

Is this the normal behavior?
Are there any ways how to detect weather the device has been disconnected 
before calling the read function?
Any Ideas how to fix or work around this?

Thank you for your help.

Tim Schneider


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

Current Thread