Commit 6f9b3a81 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

sip_basic.c: sip_from_create() now return instance of sip_from_t, not sip_to_t

Bug reported by Ludovico Cavedon

parent b3e05796
......@@ -899,7 +899,7 @@ sip_addr_make_url(su_home_t *home, msg_hclass_t *hc, url_string_t const *us)
sip_header_t *h;
n = url_xtra(us->us_url);
h = sip_header_alloc(home, sip_to_class, n);
h = sip_header_alloc(home, hc, n);
if (h) {
sip_addr_t *a = h->sh_to;
......@@ -412,7 +412,12 @@ int test_basic(void)
TEST_1(sip_from_tag(home, f, "tag=jxahudsf") == 0);
su_free(home, f);
TEST_1(f = sip_from_create(home, (void *)"<sip:joe@bar;tag=bar> (joe)"));
su_free(home, f);
TEST_1(t = sip_to_create(home, (void *)"<sip:joe@bar;tag=bar> (joe)"));
TEST_1(sip_to_tag(home, t, "tag=jxahudsf") == 0);
TEST_S(t->a_tag, "jxahudsf");
TEST(msg_header_replace_param(home, t->a_common, "tag=bar"), 1);
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