rpms/nut/F-9 nut-2.2.2-trippliteusb_476850.patch, NONE, 1.1 nut.spec, 1.59, 1.60

Michal Hlavinka mhlavink at fedoraproject.org
Thu Dec 18 13:49:16 UTC 2008


Author: mhlavink

Update of /cvs/extras/rpms/nut/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3310

Modified Files:
	nut.spec 
Added Files:
	nut-2.2.2-trippliteusb_476850.patch 
Log Message:
fix #476850 - tripplite_usb driver segfaults when UPS on battery


nut-2.2.2-trippliteusb_476850.patch:

--- NEW FILE nut-2.2.2-trippliteusb_476850.patch ---
--- a/drivers/tripplite_usb.c	
+++ a/drivers/tripplite_usb.c	
@@ -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"
 
 /* % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
  *
@@ -358,8 +358,6 @@ static int reconnect_ups(void)
 	upsdebugx(2, "= device has been disconnected, try to reconnect =");
 	upsdebugx(2, "==================================================");
 
-	upsdrv_cleanup();
-
 	ret = comm_driver->open(&udev, &curDevice, reopen_matcher, NULL);
 	if (ret < 1) {
 		upslogx(LOG_INFO, "Reconnecting to UPS failed; will retry later...");
@@ -515,12 +513,10 @@ void usb_comm_fail(int res, const char *msg)
 		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;


Index: nut.spec
===================================================================
RCS file: /cvs/extras/rpms/nut/F-9/nut.spec,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- nut.spec	19 May 2008 12:44:39 -0000	1.59
+++ nut.spec	18 Dec 2008 13:48:46 -0000	1.60
@@ -9,7 +9,7 @@
 Summary: Network UPS Tools
 Name: nut
 Version: 2.2.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 Group: Applications/System
 License: GPLv2+
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -24,6 +24,7 @@
 Patch3: nut-2.2.1-glibcopen.patch
 Patch4: nut-2.2.2-usbhal.patch
 Patch5: nut-2.2.2-halpath.patch
+Patch6: nut-2.2.2-trippliteusb_476850.patch
 
 Requires: nut-client => 2.0.0 hal dbus-glib
 Requires(post): fileutils /sbin/chkconfig /sbin/service
@@ -107,6 +108,7 @@
 %patch3 -p1 -b .open
 %patch4 -p1 -b .usbhal
 %patch5 -p1 -b .halpath
+%patch6 -p1 -b .trippliteusb_476850
 
 %build
 autoreconf
@@ -321,6 +323,9 @@
 %{_libdir}/pkgconfig/libupsclient.pc
 
 %changelog
+* Wed Dec 17 2008 Michal Hlavinka <mhlavink at redhat.com> 2.2.2-2
+- fix #476850 - tripplite_usb driver segfaults when UPS on battery
+
 * Mon May 19 2008 Tomas Smetana <tsmetana at redhat.com> 2.2.2-1
 - new upstream version
 




More information about the fedora-extras-commits mailing list