[mythtv] Caller ID patch (cidbcast.c)

Ken Bass kbass at kenbass.com
Sat Feb 28 23:51:25 EST 2004


Isaac,
  This is a small patch to cidbcast.c. While testing with a different modem,
I found that there was a case where a single read from the socket would
fetch the 'RING' string as well as the caller id info. Perhaps this
particular modem buffers the data. In this case, the caller id info would be
thrown away and no data sent out (it would act like a modem without caller
id). This should fix that fairly rare condition. Thanks.

--- /home/mythtv/mythtv-0.13/contrib/mythnotify/cidbcast/cidbcast.c
2004-02-28 18:54:56.000000000 -0500
+++ ./cidbcast.c	2004-02-28 23:37:13.000000000 -0500
@@ -254,11 +254,9 @@
 	 while ((nbytes = read(fd, bufptr, buffer + sizeof(buffer) - bufptr
- 1)) > 0)
 	   {
 	     bufptr += nbytes;
-	     if (bufptr[-1] == '\n' || bufptr[-1] == '\r')
-	       break;
 	   }
 	 
-	 /* nul terminate the string and see if we got an OK response */
+	 /* nul terminate the string and see if we got an complete response
*/
 	 *bufptr = '\0';
 	 
 	 if (checkfor_cid_info(buffer, 255,



More information about the mythtv-dev mailing list