Commit 6ca2b96f authored by Pekka Pessi's avatar Pekka Pessi

su: using <sofia-sip/su_string.h>

darcs-hash:20090108181338-db55f-de09c2950a4a86957254edbf5df8096a91622e65.gz
parent c5742fef
......@@ -41,6 +41,7 @@
#include <sofia-sip/su.h>
#include <sofia-sip/su_localinfo.h>
#include <sofia-sip/su_string.h>
#include "su_module_debug.h"
#include <stdio.h>
......@@ -1600,7 +1601,7 @@ int li_name(su_localinfo_t const *hints,
return ELI_RESOLVER;
}
if (hints->li_canonname && strcasecmp(name, hints->li_canonname))
if (hints->li_canonname && !su_casematch(name, hints->li_canonname))
return 1;
if (!(flags & LI_CANONNAME))
......
......@@ -139,7 +139,7 @@ void su_port_set_system_preferences(char const *name)
}
#endif
#if HAVE_WIN32
else if (strcasecmp(name, "wsaevent") == 0) {
else if (su_casematch(name, "wsaevent")) {
create = su_wsaevent_port_create;
start = su_wsaevent_clone_start;
}
......
......@@ -57,6 +57,7 @@
#include <sofia-sip/su_tag_class.h>
#include <sofia-sip/su_tag_inline.h>
#include <sofia-sip/su_tagarg.h>
#include <sofia-sip/su_string.h>
#ifndef HAVE_STRTOULL
unsigned longlong strtoull(const char *, char **, int);
......@@ -1399,10 +1400,10 @@ int t_bool_scan(tag_type_t tt, su_home_t *home,
int retval;
int value = 0;
if (strncasecmp(s, "true", 4) == 0
if (su_casenmatch(s, "true", 4)
&& strlen(s + 4) == strspn(s + 4, " \t\r\n")) {
value = 1, retval = 1;
} else if (strncasecmp(s, "false", 5) == 0
} else if (su_casenmatch(s, "false", 5)
&& strlen(s + 5) == strspn(s + 5, " \t\r\n")) {
value = 0, retval = 1;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment