mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-12 23:40:04 +00:00
Thu Jan 8 12:13:38 CST 2009 Pekka Pessi <first.last@nokia.com>
* su: using <sofia-sip/su_string.h> git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11792 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
1b44df1dc5
commit
85cafb105d
@ -1 +1 @@
|
||||
Wed Feb 11 10:27:42 CST 2009
|
||||
Wed Feb 11 10:45:40 CST 2009
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user