[Freeswitch-svn] [commit] r11801 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/bnf

FreeSWITCH SVN mikej at freeswitch.org
Wed Feb 11 08:49:51 PST 2009


Author: mikej
Date: Wed Feb 11 10:49:51 2009
New Revision: 11801

Log:
Thu Jan  8 14:55:01 CST 2009  Pekka Pessi <first.last at nokia.com>
  * bnf: using <sofia-sip/su_string.h>



Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.c

Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Wed Feb 11 10:49:51 2009
@@ -1 +1 @@
-Wed Feb 11 10:49:17 CST 2009
+Wed Feb 11 10:49:44 CST 2009

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am	Wed Feb 11 10:49:51 2009
@@ -26,7 +26,7 @@
 
 COVERAGE_INPUT = 	$(libbnf_la_SOURCES) $(include_sofia_HEADERS)
 
-LDADD =			libbnf.la
+LDADD =			libbnf.la ../su/libsu.la
 
 torture_bnf_LDFLAGS = 	-static
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.c	Wed Feb 11 10:49:51 2009
@@ -34,6 +34,7 @@
 #include "config.h"
 
 #include "sofia-sip/bnf.h"
+#include "sofia-sip/su_string.h"
 
 #include <stdio.h>
 #include <assert.h>
@@ -795,12 +796,12 @@
 
   return
     n >= 9 /* strlen("localhost") */ &&
-    strncasecmp(host, "localhost", 9) == 0 &&
+    su_casenmatch(host, "localhost", 9) &&
     (n == 9 ||
      ((n == 10 || /* localhost. */
        n == 21 || /* strlen("localhost.localdomain") */
        n == 22) && /* strlen("localhost.localdomain.") */
-      strncasecmp(host + 9, ".localdomain.", n - 9) == 0));
+      su_casenmatch(host + 9, ".localdomain.", n - 9)));
 }
 
 /** Return true if @a string has domain name in "invalid." domain.
@@ -815,9 +816,9 @@
     if (string[n - 1] == '.')	/* .invalid. perhaps? */
       n--;
     if (n == 7 /* strlen("invalid") */)
-      return strncasecmp(string, invalid + 1, 7) == 0;
+      return su_casenmatch(string, invalid + 1, 7);
     else
-      return strncasecmp(string + n - 8, invalid, 8) == 0;
+      return su_casenmatch(string + n - 8, invalid, 8);
   }
 
   return 0;
@@ -913,7 +914,7 @@
 	retval = memcmp(a6, b6, asize);
     }
     else {
-      retval = strcasecmp(a, b);
+      retval = su_strcasecmp(a, b);
     }
   }
 



More information about the Freeswitch-svn mailing list