Displaying 4 results from an estimated 4 matches for "reopen_match".
Did you mean:
reopen_matcher
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...e to
confine libhid 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 chang...
2007 Jun 21
2
[nut-commits] svn commit r971 - in trunk: . drivers
...> upsdebugx(2, "==================================================");
> 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);
> + }
> }
> }
>
>...
2020 Apr 03
0
Patch to support Powercool PCRACK-1200VA
...t;
Patch is below, I hope it is of assistance.
Regards,
Ian
diff --git a/drivers/nutdrv_qx.c b/drivers/nutdrv_qx.c
index bb526608..75bb97f8 100644
--- a/drivers/nutdrv_qx.c
+++ b/drivers/nutdrv_qx.c
@@ -422,6 +422,7 @@ static USBDevice_t usbdevice;
static USBDeviceMatcher_t *reopen_matcher = NULL;
static USBDeviceMatcher_t *regex_matcher = NULL;
static int langid_fix = -1;
+static int buflen_fix = -1;
static int (*subdriver_command)(const char *cmd, char *buf, size_t
buflen) = NULL;
@@ -702,8 +703,15 @@ static int krauler_command(...
2020 Apr 03
0
Powercool PCRACK-1200VA patch update
...relb")) {
diff --git a/drivers/nutdrv_qx.c b/drivers/nutdrv_qx.c
index bb526608..ad450e39 100644
--- a/drivers/nutdrv_qx.c
+++ b/drivers/nutdrv_qx.c
@@ -421,7 +421,6 @@ static usb_dev_handle *udev = NULL;
static USBDevice_t usbdevice;
static USBDeviceMatcher_t *reopen_matcher = NULL;
static USBDeviceMatcher_t *regex_matcher = NULL;
-static int langid_fix = -1;
static int (*subdriver_command)(const char *cmd, char *buf, size_t
buflen) = NULL;
@@ -717,13 +716,7 @@ static int krauler_command(const char *cmd, char
*buf, size_t buflen)...