Tue Feb 24 07:33:35 CST 2009 Pekka Pessi <first.last@nokia.com>
* sip_parser.c: fixed sip_transport_d() Ignore-this: c14408145a269c25d00dcb20ab2391f6 sip_transport_d() was expected to canonize casing of well-known transports. Thanks for Adrian Gschwend for reporting the problem. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12261 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
46c3eec39a
commit
be15ed423f
|
@ -1 +1 @@
|
|||
Tue Feb 24 08:43:18 CST 2009
|
||||
Tue Feb 24 08:44:37 CST 2009
|
||||
|
|
|
@ -459,8 +459,9 @@ issize_t sip_transport_d(char **ss, char const **ttransport)
|
|||
size_t pn_len, pv_len, pt_len;
|
||||
char *s = *ss;
|
||||
|
||||
#define TRANSPORT_MATCH(t) \
|
||||
(su_casenmatch(s + 7, t + 7, (sizeof t) - 8) && (IS_LWS(s[sizeof(t)])) \
|
||||
#define TRANSPORT_MATCH(t) \
|
||||
(su_casenmatch(s + 7, t + 7, (sizeof t) - 8) && \
|
||||
(!s[sizeof(t) - 1] || IS_LWS(s[sizeof(t) - 1])) \
|
||||
&& (transport = t, s += sizeof(t) - 1))
|
||||
|
||||
if (!su_casenmatch(s, "SIP/2.0", 7) ||
|
||||
|
|
|
@ -710,6 +710,31 @@ int test_basic(void)
|
|||
su_free(home, v), su_free(home, s);
|
||||
}
|
||||
|
||||
{
|
||||
char *input;
|
||||
char const *output = NULL;
|
||||
char udp[] = "sip/2.0/udp";
|
||||
char tcp[] = "sip/2.0/tCp ";
|
||||
char sctp[] = "sip/2.0/sctp\t";
|
||||
char tls[] = "sip/2.0/tls\r";
|
||||
|
||||
input = udp;
|
||||
TEST(sip_transport_d(&input, &output), 0);
|
||||
TEST_S(output, "SIP/2.0/UDP");
|
||||
|
||||
input = tcp;
|
||||
TEST(sip_transport_d(&input, &output), 0);
|
||||
TEST_S(output, "SIP/2.0/TCP");
|
||||
|
||||
input = sctp;
|
||||
TEST(sip_transport_d(&input, &output), 0);
|
||||
TEST_S(output, "SIP/2.0/SCTP");
|
||||
|
||||
input = tls;
|
||||
TEST(sip_transport_d(&input, &output), 0);
|
||||
TEST_S(output, "SIP/2.0/TLS");
|
||||
}
|
||||
|
||||
{
|
||||
sip_expires_t *ex;
|
||||
|
||||
|
@ -2323,7 +2348,7 @@ static int test_www_authenticate(void)
|
|||
TEST_S(www->au_scheme, "Kerberos");
|
||||
TEST_1(www = www->au_next);
|
||||
TEST_S(www->au_scheme, "NTLM");
|
||||
|
||||
|
||||
msg_destroy(msg);
|
||||
|
||||
END();
|
||||
|
|
Loading…
Reference in New Issue