Commit 6e10fb2c authored by Pekka Pessi's avatar Pekka Pessi

Better handling of optional tags in nta_agent_get_params().

darcs-hash:20051223134246-65a35-c01cfaec7c16436ab4c51a82f64e8ef8d2078be7.gz
parent 2ef024da
......@@ -1087,6 +1087,8 @@ int agent_get_params(nta_agent_t *agent, tagi_t *tags)
NTATAG_USE_SRV(agent->sa_use_srv),
#if HAVE_SOFIA_SMIME
NTATAG_SMIME(agent->sa_smime),
#else
NTATAG_SMIME(NULL),
#endif
NTATAG_SIPFLAGS(agent->sa_flags),
NTATAG_RPORT(agent->sa_rport),
......@@ -1095,6 +1097,8 @@ int agent_get_params(nta_agent_t *agent, tagi_t *tags)
NTATAG_SIGCOMP_OPTIONS(agent->sa_sigcomp_options ?
agent->sa_sigcomp_options :
"sip"),
#else
NTATAG_SIGCOMP_OPTIONS(NULL),
#endif
TAG_END());
}
......
......@@ -535,17 +535,18 @@ int api_test_params(agent_t *ag)
TEST(preload, 2048);
TEST(nta_agent_set_params(nta,
NTATAG_SIGCOMP_OPTIONS("sip"),
TAG_END()), have_sigcomp);
NTATAG_SIGCOMP_OPTIONS("sip"),
TAG_END()), have_sigcomp);
TEST(nta_agent_set_params(nta,
NTATAG_SIGCOMP_OPTIONS(","),
TAG_END()), -have_sigcomp);
NTATAG_SIGCOMP_OPTIONS(","),
TAG_END()), -have_sigcomp);
TEST(nta_agent_set_params(nta,
NTATAG_SIGCOMP_OPTIONS("sip;dms=16384"),
TAG_END()), have_sigcomp);
NTATAG_SIGCOMP_OPTIONS("sip;dms=16384"),
TAG_END()), have_sigcomp);
s = NONE;
TEST(nta_agent_get_params(nta,
NTATAG_SIGCOMP_OPTIONS_REF(s),
TAG_END()), have_sigcomp);
NTATAG_SIGCOMP_OPTIONS_REF(s),
TAG_END()), 1);
if (have_sigcomp)
TEST_S(s, "sip;dms=16384");
else
......
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