reassign 297694 libwvstreams0.4-extras
merge 297554 297694
tags 297554 patch
thanks

The attached patch fixes this bug by making the TIOCSSERIAL and TIOCGSERIAL
ioctl calls completely optional, since one or both have been shown to fail
on some types of modems under Linux.  I'm uploading this patch as a 0-day
NMU to fix this RC bug for sarge.

Thanks,
-- 
Steve Langasek
postmodern programmer
diff -u wvstreams-4.0.1/debian/changelog wvstreams-4.0.1/debian/changelog
--- wvstreams-4.0.1/debian/changelog
+++ wvstreams-4.0.1/debian/changelog
@@ -1,3 +1,12 @@
+wvstreams (4.0.1-1.4) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Further setup_modem fixes: don't depend on TIOCSSERIAL or
+    TIOCGSERIAL working at all, since they apparently don't with USB
+    modems and some WinModems.  (Closes: #297694, #297554)
+
+ -- Steve Langasek <[EMAIL PROTECTED]>  Mon, 21 Mar 2005 21:40:51 -0800
+
 wvstreams (4.0.1-1.3) unstable; urgency=high
 
   * Non-maintainer upload.
diff -u wvstreams-4.0.1/streams/wvmodem.cc wvstreams-4.0.1/streams/wvmodem.cc
--- wvstreams-4.0.1/streams/wvmodem.cc
+++ wvstreams-4.0.1/streams/wvmodem.cc
@@ -192,22 +192,16 @@
 #if HAVE_LINUX_SERIAL_H
     struct serial_struct old_sinfo, sinfo;
     sinfo.reserved_char[0] = 0;
-    if (ioctl(getrfd(), TIOCGSERIAL, &old_sinfo) < 0) 
+    if (ioctl(getrfd(), TIOCGSERIAL, &old_sinfo) >= 0) 
     {
-       seterr("Cannot get information for serial port.");
-       return;
-    }
-    sinfo = old_sinfo;
-    // Why there are two closing wait timeouts, is beyond me
-    // but there are... apparently the second one is deprecated
-    // but why take a chance...
-    sinfo.closing_wait = ASYNC_CLOSING_WAIT_NONE;
-    sinfo.closing_wait2 = ASYNC_CLOSING_WAIT_NONE;
+        sinfo = old_sinfo;
+        // Why there are two closing wait timeouts, is beyond me
+        // but there are... apparently the second one is deprecated
+        // but why take a chance...
+        sinfo.closing_wait = ASYNC_CLOSING_WAIT_NONE;
+        sinfo.closing_wait2 = ASYNC_CLOSING_WAIT_NONE;
 
-    if (ioctl(getrfd(), TIOCSSERIAL, &sinfo) < 0 && getuid() == 0) 
-    {
-       seterr("Cannot set information for serial port.");
-       return;
+        ioctl(getrfd(), TIOCSSERIAL, &sinfo);
     }
 #endif
 

Attachment: signature.asc
Description: Digital signature

Reply via email to