forked from Mirrors/freeswitch
Thu Jan 8 12:13:05 CST 2009 Pekka Pessi <first.last@nokia.com>
* tests: using <sofia-sip/su_string.h> functions git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11791 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
b200642f87
commit
1b44df1dc5
@ -1254,7 +1254,7 @@ size_t filter_200_OK(void *arg, void *message, size_t len)
|
||||
{
|
||||
(void)arg;
|
||||
|
||||
if (len >= 11 && strncasecmp(message, "SIP/2.0 200", 11) == 0)
|
||||
if (len >= 11 && su_casenmatch(message, "SIP/2.0 200", 11))
|
||||
return 0;
|
||||
return len;
|
||||
}
|
||||
@ -1263,7 +1263,7 @@ size_t filter_ACK(void *arg, void *message, size_t len)
|
||||
{
|
||||
(void)arg;
|
||||
|
||||
if (len >= 7 && strncasecmp(message, "ACK sip", 7) == 0)
|
||||
if (len >= 7 && su_casenmatch(message, "ACK sip", 7))
|
||||
return 0;
|
||||
return len;
|
||||
}
|
||||
|
@ -945,7 +945,7 @@ size_t count_acks(void *arg, void *message, size_t len)
|
||||
{
|
||||
(void)arg;
|
||||
|
||||
if (strncasecmp(message, "ACK sip:", 8) == 0)
|
||||
if (su_casenmatch(message, "ACK sip:", 8))
|
||||
ack_sent++;
|
||||
|
||||
return len;
|
||||
|
@ -50,6 +50,7 @@ struct call;
|
||||
#include <sofia-sip/su_log.h>
|
||||
#include <sofia-sip/su_tagarg.h>
|
||||
#include <sofia-sip/su_tag_io.h>
|
||||
#include <sofia-sip/su_string.h>
|
||||
#include <sofia-sip/nua_tag.h>
|
||||
|
||||
#if __APPLE_CC__
|
||||
|
@ -688,7 +688,7 @@ static sip_contact_t *create_transport_contacts(struct proxy *p)
|
||||
char const *proto = v->v_protocol;
|
||||
|
||||
if (v->v_next &&
|
||||
strcasecmp(v->v_host, v->v_next->v_host) == 0 &&
|
||||
su_casematch(v->v_host, v->v_next->v_host) &&
|
||||
str0cmp(v->v_port, v->v_next->v_port) == 0 &&
|
||||
((proto == sip_transport_udp &&
|
||||
v->v_next->v_protocol == sip_transport_tcp) ||
|
||||
@ -861,7 +861,7 @@ static int originating_transaction(struct proxy_tr *t)
|
||||
return 0;
|
||||
|
||||
for (o = t->proxy->domains; o; o = o->next)
|
||||
if (strcasecmp(host, o->uri->url_host) == 0)
|
||||
if (su_casematch(host, o->uri->url_host))
|
||||
break;
|
||||
|
||||
t->origin = o;
|
||||
@ -1286,7 +1286,7 @@ static int check_received_contact(struct proxy_tr *t)
|
||||
sip_via_t *v = sip->sip_via;
|
||||
|
||||
if (m && v && v->v_received && m->m_url->url_host
|
||||
&& strcasecmp(v->v_received, m->m_url->url_host)
|
||||
&& !su_casematch(v->v_received, m->m_url->url_host)
|
||||
&& host_is_ip_address(m->m_url->url_host))
|
||||
return respond_transaction(t, 406, "Unacceptable Contact", TAG_END());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user