rpms/linuxwacom/F-12 linuxwacom-0.8.2-2-wacdump-timeout.patch, NONE, 1.1 linuxwacom.spec, 1.84, 1.85

Peter Hutterer whot at fedoraproject.org
Mon Nov 30 23:18:20 UTC 2009


Author: whot

Update of /cvs/pkgs/rpms/linuxwacom/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20610

Modified Files:
	linuxwacom.spec 
Added Files:
	linuxwacom-0.8.2-2-wacdump-timeout.patch 
Log Message:
* Tue Dec 01 2009 Peter Hutterer <peter.hutterer at redhat.com> 0.8.2.2-17
- linuxwacom-0.8.2-2-wacdump-timeout.patch: time out the select if no reply
  is received (#538096)


linuxwacom-0.8.2-2-wacdump-timeout.patch:
 wacserial.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- NEW FILE linuxwacom-0.8.2-2-wacdump-timeout.patch ---
diff -up linuxwacom-0.8.2-2/src/util/wacserial.c.timeout linuxwacom-0.8.2-2/src/util/wacserial.c
--- linuxwacom-0.8.2-2/src/util/wacserial.c.timeout	2009-11-17 10:34:44.941209860 +0000
+++ linuxwacom-0.8.2-2/src/util/wacserial.c	2009-11-17 10:36:49.707209491 +0000
@@ -1414,6 +1414,16 @@ static int SerialSendRequest(SERIALTABLE
 	/* get the rest of the response */
 	for (uCnt=0; uCnt<uSize; ++uCnt)
 	{
+		timeout.tv_sec = 0;
+		timeout.tv_usec = 500000;
+		FD_ZERO(&fdsRead);
+		FD_SET(pSerial->fd, &fdsRead);
+		if (select(FD_SETSIZE,&fdsRead,NULL,NULL,&timeout) <= 0)
+		{
+			pchResponse[uCnt] = '\0';
+			return 0;
+		}
+
 		nXfer = read(pSerial->fd,pchResponse+uCnt,1);
 		if (nXfer <= 0)
 		{


Index: linuxwacom.spec
===================================================================
RCS file: /cvs/pkgs/rpms/linuxwacom/F-12/linuxwacom.spec,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -p -r1.84 -r1.85
--- linuxwacom.spec	24 Nov 2009 06:52:46 -0000	1.84
+++ linuxwacom.spec	30 Nov 2009 23:18:19 -0000	1.85
@@ -3,7 +3,7 @@
 # Upstream's versioning is goofy.  Note the mapping from tarname to version.
 Name:		linuxwacom
 Version:	0.8.2.2
-Release:	16%{?dist}
+Release:	17%{?dist}
 Summary:	Wacom Drivers from Linux Wacom Project
 
 Group:		User Interface/X Hardware Support
@@ -43,6 +43,8 @@ Patch13:	linuxwacom-8.2.2.2-buttonnumber
 
 # RH#538097
 Patch14:        linuxwacom-0.8.2.2-wacdump-penpartner.patch
+# RH#538096
+Patch15:        linuxwacom-0.8.2-2-wacdump-timeout.patch
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}
 BuildRequires:	libX11-devel libXi-devel ncurses-devel
@@ -83,6 +85,7 @@ compiling applications for manipulating 
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
+%patch15 -p1
 
 %build
 
@@ -145,6 +148,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libwacomcfg*.so
 
 %changelog
+* Tue Dec 01 2009 Peter Hutterer <peter.hutterer at redhat.com> 0.8.2.2-17
+- linuxwacom-0.8.2-2-wacdump-timeout.patch: time out the select if no reply
+  is received (#538096)
+
 * Tue Nov 24 2009 Peter Hutterer <peter.hutterer at redhat.com> 0.8.2.2-16
 - linuxwacom-0.8.2.2-wacdump-penpartner.patch: teach wacdump about the
   PenPartner CT-0045R00a (#538097)




More information about the fedora-extras-commits mailing list