[Freeswitch-trunk] [commit] r13749 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/sresolv
FreeSWITCH SVN
mikej at freeswitch.org
Wed Jun 10 08:24:35 PDT 2009
Author: mikej
Date: Wed Jun 10 10:24:34 2009
New Revision: 13749
Log:
libsofia: handle mid-line comments in resolv.conf patch from Lee Verberne (SFSIP-152)
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Wed Jun 10 10:24:34 2009
@@ -1 +1 @@
-Thu Jun 4 16:10:50 CDT 2009
+Wed Jun 10 11:14:52 EDT 2009
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c Wed Jun 10 10:24:34 2009
@@ -2270,11 +2270,11 @@
/* Skip whitespace at the beginning ...*/
b = buf + strspn(buf, " \t");
- /* ... and at the end of line */
- for (len = strlen(b); len > 0 && strchr(" \t\r\n", b[len - 1]); len--)
+ /* ... and comments + whitespace at the end */
+ for (len = strcspn(b, "#;"); len > 0 && strchr(" \t\r\n", b[len - 1]); len--)
;
- if (len == 0 || b[0] == '#') /* Empty line or comment */
+ if (len == 0) /* Empty line or comment */
continue;
b[len] = '\0';
More information about the Freeswitch-trunk
mailing list