View | Details | Raw Unified | Return to bug 17955
Collapse All | Expand All

(-)a/nut/drivers/libusb.c (-1 / +4 lines)
Lines 208-214 static int libusb_open(usb_dev_handle **udevp, USBDevice_t *curDevice, USBDevice Link Here
208
#endif
208
#endif
209
			
209
			
210
			/* set default interface */
210
			/* set default interface */
211
			usb_set_altinterface(udev, 0);
211
			if (usb_set_altinterface(udev, 0) < 0) {
212
				upsdebugx(2, " Couldn't set default interface");
213
				goto next_device;
214
			}
212
			
215
			
213
			if (!callback) {
216
			if (!callback) {
214
				return 1;
217
				return 1;
(-)a/nut/drivers/usbhid-ups.c (-2 / +4 lines)
Lines 84-90 static int pollfreq = DEFAULT_POLLFREQ; Link Here
84
static int ups_status = 0;
84
static int ups_status = 0;
85
static bool_t data_has_changed = FALSE; /* for SEMI_STATIC data polling */
85
static bool_t data_has_changed = FALSE; /* for SEMI_STATIC data polling */
86
static time_t lastpoll; /* Timestamp the last polling */
86
static time_t lastpoll; /* Timestamp the last polling */
87
hid_dev_handle_t udev;
87
hid_dev_handle_t udev = NULL;
88
88
89
/* support functions */
89
/* support functions */
90
static hid_info_t *find_nut_info(const char *varname);
90
static hid_info_t *find_nut_info(const char *varname);
Lines 1360-1366 static int reconnect_ups(void) Link Here
1360
	upsdebugx(4, "==================================================");
1360
	upsdebugx(4, "==================================================");
1361
	upsdebugx(4, "= device has been disconnected, try to reconnect =");
1361
	upsdebugx(4, "= device has been disconnected, try to reconnect =");
1362
	upsdebugx(4, "==================================================");
1362
	upsdebugx(4, "==================================================");
1363
1363
	if (udev)
1364
		comm_driver->close(udev);
1365
	
1364
	ret = comm_driver->open(&udev, &curDevice, subdriver_matcher,
1366
	ret = comm_driver->open(&udev, &curDevice, subdriver_matcher,
1365
#ifdef SHUT_MODE
1367
#ifdef SHUT_MODE
1366
		NULL);
1368
		NULL);

Return to bug 17955