search for: mode_reopen

Displaying 5 results from an estimated 5 matches for "mode_reopen".

2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...hid to low-level operations, and leave the decision of trying to reopen vs. retrying to open to the high-level driver, in this case usbhid-ups? I envision that the code in usbhid-ups:reconnect_ups() could be changed to something like: hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, MODE_REOPEN); if (hd == NULL) { /* reopening failed, try opening new device */ hd = HIDOpenDevice(&udev, &curDevice, regex_matcher, MODE_OPEN); } if (hd == NULL) { return 0; } Note "regex_matcher", not "reopen_matcher", in the second call, and also the changed MODE flag....
2007 Aug 24
1
[nut-commits] svn commit r1074 - in trunk: . drivers
...reversing this change. > * drivers/usbhid-ups.c: > - The behaviour of reconnect is now depending on the 'reloadmatcher' > variable. By default, it uses 'exact' matches, but this can be > changed to 'regex', which me ans that it will use MODE_OPEN instead > of MODE_REOPEN. Essentially, it will beha ve exactly like starting > again. Shouldn't the default be to use exact matching whenever possible, and fall back to MODE_OPEN matching on failure (i.e., the currently intended behavior)? The other choice, which a user might request, is strict matching, i.e., to e...
2007 Jun 21
2
[nut-commits] svn commit r971 - in trunk: . drivers
..."=================================================="); > upsdebugx(2, "= device has been disconnected, try to reconnect ="); > @@ -1001,8 +1001,12 @@ > udev = NULL; > #endif > > - if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, > MODE_REOPEN)) == NULL) > - dstate_datastale(); > + if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, > MODE_REOPEN)) == NULL) { > + dstate_datastale(); > + > + /* Wait a bit before retrying... */ > + sleep(5); > + } > } > } > > > _____________...
2007 Feb 08
3
Re: [nut-commits] svn commit r801 - in branches/megatec-usb: . drivers
...+ branches/megatec-usb/drivers/megatec_usb.c Thu Feb 8 16:43:43 2007 > @@ -152,7 +152,7 @@ > } > } > > - ret = usb->open(&udev,&hiddevice,&match,u.report_desc,MODE_OPEN); > + ret = usb->open(&udev,&hiddevice,&match,u.report_desc,MODE_REOPEN); > if (ret<0) > usb_open_error(port); > > > _______________________________________________ > nut-commits mailing list > nut-commits@lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-commits >
2007 Feb 07
2
some megatec-usb issues
...tchers all return 1. (If I'm not right, please, tell me). So this decision wouldn't affect other drivers. Also I want to note that any matcher should be able to prevent retrieving HID descriptors. libusb_open has already everything that is needed. If the "mode" variable is set to MODE_REOPEN then HID descriptors aren't retrieved. So the simpliest thing is to change it: --- libusb.c (revision 799) +++ libusb.c (working copy) @@ -180,7 +180,7 @@ } else if (ret==-2) { upsdebugx(2, "matcher: unspecifi...