Commit c5742fef authored by Pekka Pessi's avatar Pekka Pessi

tests: using <sofia-sip/su_string.h> functions

darcs-hash:20090108181305-db55f-312593a8ea1710824c2304eb5893f7c5a4b28d9b.gz
parent b1899ef0
...@@ -1254,7 +1254,7 @@ size_t filter_200_OK(void *arg, void *message, size_t len) ...@@ -1254,7 +1254,7 @@ size_t filter_200_OK(void *arg, void *message, size_t len)
{ {
(void)arg; (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 0;
return len; return len;
} }
...@@ -1263,7 +1263,7 @@ size_t filter_ACK(void *arg, void *message, size_t len) ...@@ -1263,7 +1263,7 @@ size_t filter_ACK(void *arg, void *message, size_t len)
{ {
(void)arg; (void)arg;
if (len >= 7 && strncasecmp(message, "ACK sip", 7) == 0) if (len >= 7 && su_casenmatch(message, "ACK sip", 7))
return 0; return 0;
return len; return len;
} }
......
...@@ -945,7 +945,7 @@ size_t count_acks(void *arg, void *message, size_t len) ...@@ -945,7 +945,7 @@ size_t count_acks(void *arg, void *message, size_t len)
{ {
(void)arg; (void)arg;
if (strncasecmp(message, "ACK sip:", 8) == 0) if (su_casenmatch(message, "ACK sip:", 8))
ack_sent++; ack_sent++;
return len; return len;
......
...@@ -50,6 +50,7 @@ struct call; ...@@ -50,6 +50,7 @@ struct call;
#include <sofia-sip/su_log.h> #include <sofia-sip/su_log.h>
#include <sofia-sip/su_tagarg.h> #include <sofia-sip/su_tagarg.h>
#include <sofia-sip/su_tag_io.h> #include <sofia-sip/su_tag_io.h>
#include <sofia-sip/su_string.h>
#include <sofia-sip/nua_tag.h> #include <sofia-sip/nua_tag.h>
#if __APPLE_CC__ #if __APPLE_CC__
......
...@@ -688,7 +688,7 @@ static sip_contact_t *create_transport_contacts(struct proxy *p) ...@@ -688,7 +688,7 @@ static sip_contact_t *create_transport_contacts(struct proxy *p)
char const *proto = v->v_protocol; char const *proto = v->v_protocol;
if (v->v_next && 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 && str0cmp(v->v_port, v->v_next->v_port) == 0 &&
((proto == sip_transport_udp && ((proto == sip_transport_udp &&
v->v_next->v_protocol == sip_transport_tcp) || v->v_next->v_protocol == sip_transport_tcp) ||
...@@ -861,7 +861,7 @@ static int originating_transaction(struct proxy_tr *t) ...@@ -861,7 +861,7 @@ static int originating_transaction(struct proxy_tr *t)
return 0; return 0;
for (o = t->proxy->domains; o; o = o->next) 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; break;
t->origin = o; t->origin = o;
...@@ -1286,7 +1286,7 @@ static int check_received_contact(struct proxy_tr *t) ...@@ -1286,7 +1286,7 @@ static int check_received_contact(struct proxy_tr *t)
sip_via_t *v = sip->sip_via; sip_via_t *v = sip->sip_via;
if (m && v && v->v_received && m->m_url->url_host 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)) && host_is_ip_address(m->m_url->url_host))
return respond_transaction(t, 406, "Unacceptable Contact", TAG_END()); return respond_transaction(t, 406, "Unacceptable Contact", TAG_END());
......
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