Commit 9097e82c authored by Pekka Pessi's avatar Pekka Pessi
Browse files

Really fixed setting of SOATAG_MEDIA_PROFILE().

darcs-hash:20050913085331-65a35-41874398d19a3c5f351b8d1ad8e96afbeb3455fc.gz
parent 6bafeca0
......@@ -340,6 +340,9 @@ int soa_base_init(char const *name,
ss->ss_srtp_integrity = parent->ss_srtp_integrity;
}
if (ss->ss_path == NULL)
ss->ss_path = su_strdup(ss->ss_home, "/");
return 0;
}
......@@ -401,6 +404,7 @@ int soa_base_set_params(soa_session_t *ss, tagi_t const *tags)
media_address = ss->ss_address;
mss_sdp = ss->ss_mss_sdp;
mss_cfg = ss->ss_mss_cfg;
media_profile = ss->ss_path;
media_event_path = NONE;
image_local = ss->ss_image_local;
......
......@@ -202,10 +202,27 @@ int test_params(struct context *ctx)
{
BEGIN();
int n;
char const *value;
n = soa_set_params(ctx->asynch.a, TAG_END()); TEST(n, 0);
n = soa_set_params(ctx->asynch.b, TAG_END()); TEST(n, 0);
value = "foo";
TEST(soa_get_params(ctx->asynch.a,
SOATAG_MEDIA_PROFILE_REF(value),
TAG_END()),
1);
TEST_S(value, "/");
TEST(soa_set_params(ctx->asynch.a,
SOATAG_MEDIA_PROFILE("/bar"),
TAG_END()),
1);
TEST(soa_get_params(ctx->asynch.a,
SOATAG_MEDIA_PROFILE_REF(value),
TAG_END()),
1);
TEST_S(value, "/bar");
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