Blob Blame History Raw
diff -up nut-2.2.0/drivers/tripplite_usb.c.trippliteusb_476850 nut-2.2.0/drivers/tripplite_usb.c
--- nut-2.2.0/drivers/tripplite_usb.c.trippliteusb_476850	2007-06-23 05:36:15.000000000 +0200
+++ nut-2.2.0/drivers/tripplite_usb.c	2009-01-05 16:41:02.050817936 +0100
@@ -25,7 +25,7 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
 
-#define DRV_VERSION "0.11"
+#define DRV_VERSION "0.11.1"
 
 /* % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
  *
@@ -355,8 +355,6 @@ static int reconnect_ups(void)
 		upsdebugx(2, "= device has been disconnected, try to reconnect =");
 		upsdebugx(2, "==================================================");
 
-		upsdrv_cleanup();
-
 		if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, MODE_REOPEN)) == NULL) {
 			upslogx(LOG_INFO, "Reconnecting to UPS failed; will retry later...");
 			dstate_datastale();
@@ -509,12 +507,10 @@ void usb_comm_fail(int res, const char *
 		case -EBUSY:
 			upslogx(LOG_WARNING, "%s: Device claimed by another process", msg);
 			fatalx(EXIT_FAILURE, "Terminating: EBUSY");
-			upsdrv_cleanup();
 			break;
 
 		default:
 			upslogx(LOG_WARNING, "%s: Device detached? (error %d: %s)", msg, res, usb_strerror());
-			upsdrv_cleanup();
 
 			upslogx(LOG_NOTICE, "Reconnect attempt #%d", ++try);
 			hd = NULL;