From: Roger B. <ro...@ro...> - 2004-04-29 20:53:46
|
> In the console I ran bitfling from, I saw this fairly quickly at the > beginning: > > ./BitPim.app/Contents/MacOS/BitPim bitfling > ica of ('192.168.168.106', None, None) > ica of ('192.168.168.106', None, None) > ica of ('192.168.168.106', 'n9yty', u'testpass') ica stands for "is connection allowed". The first two are the code checking if the specific address can connect, with the latter verifying a username/password from an address. > toggling menu items on and off (enable/disable) This is due to an accidental implementation detail about a year ago :-) [Yes I do make mistakes]. The com/usbscan code runs in the gui thread. The BitFling stuff runs in a secondary thread. The problem is that the BitFling client may need to get a certificate verified, so it Posts a message to the gui thread. That confuses the heck out everything, as the gui thread may have called bitflingscan and be blocked waiting for a result, and the bitfling thread posts a message asking for the certificate to be verified. They would deadlock forever. So instead the gui thread stays stuck in a loop like this: while responseq.empty(): # this is the object results from bitfling thread # come back in wx.SafeYield() # need to run this as certficate verification message # may be sent to this gui thread SafeYield on Mac and Linux disables and enables the UI. The fix is going to be moving bitfling/com/usbscan to the worker thread. Roger |