]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Thu Jan 8 14:55:01 CST 2009 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Wed, 11 Feb 2009 16:49:51 +0000 (16:49 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 11 Feb 2009 16:49:51 +0000 (16:49 +0000)
  * bnf: using <sofia-sip/su_string.h>

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11801 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am
libs/sofia-sip/libsofia-sip-ua/bnf/bnf.c

index 5b56b738b6da807b7e7f5b68dfd64a0a1925e348..7cfe75543e890eda1b58957be761354ace2fd6d6 100644 (file)
@@ -1 +1 @@
-Wed Feb 11 10:49:17 CST 2009
+Wed Feb 11 10:49:44 CST 2009
index 569e517a26a7d3921905b037976b1a16e9c51484..e64f7a3b09f334a30a826a34fcb9a82fa341b10c 100644 (file)
@@ -26,7 +26,7 @@ libbnf_la_SOURCES =   bnf.c
 
 COVERAGE_INPUT =       $(libbnf_la_SOURCES) $(include_sofia_HEADERS)
 
-LDADD =                        libbnf.la
+LDADD =                        libbnf.la ../su/libsu.la
 
 torture_bnf_LDFLAGS =  -static
 
index e40bbe5e4c028969064250554717db92df943b4d..07a503dcd34dc98576d8d69499fe08a45bd43ae6 100644 (file)
@@ -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 @@ int host_is_local(char const *host)
 
   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 @@ int host_has_domain_invalid(char const *string)
     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 @@ int host_cmp(char const *a, char const *b)
        retval = memcmp(a6, b6, asize);
     }
     else {
-      retval = strcasecmp(a, b);
+      retval = su_strcasecmp(a, b);
     }
   }