Commit 8c69cfdc authored by Pekka Pessi's avatar Pekka Pessi

Application can now pass name for soa object instead of object itself.

darcs-hash:20050912122919-65a35-6e2ce7ca3d38ba7e27d7e211c4bdcda88170481c.gz
parent 3aa9e112
......@@ -187,6 +187,7 @@ int ua_init(su_root_t *root, nua_t *nua)
nua_handle_t *nh;
int media_enable = 1;
soa_session_t *soa = NULL;
char const *soa_name = NULL;
static int initialized_logs = 0;
......@@ -230,6 +231,7 @@ int ua_init(su_root_t *root, nua_t *nua)
NUTAG_UICC_REF(uicc_name),
NUTAG_MEDIA_ENABLE_REF(media_enable),
NUTAG_SOA_SESSION_REF(soa),
NUTAG_SOA_NAME_REF(soa_name),
TAG_NULL());
#if HAVE_UICC_H
......@@ -282,7 +284,9 @@ int ua_init(su_root_t *root, nua_t *nua)
nua->nua_sdp_content = sip_content_type_make(home, SDP_MIME_TYPE);
nua->nua_invite_accept = sip_accept_make(home, SDP_MIME_TYPE);
if (media_enable && soa) {
if (media_enable) {
if (soa == NULL)
soa = soa_create(soa_name, nua->nua_root, nua->nua_default);
nh->nh_soa = soa;
soa_set_params(soa, TAG_NEXT(nua->nua_args));
}
......
......@@ -59,6 +59,7 @@ tag_typedef_t nutag_media_enable = BOOLTAG_TYPEDEF(media_enable);
tag_typedef_t nutag_media_address = STRTAG_TYPEDEF(media_address);
tag_typedef_t nutag_soa_session = PTRTAG_TYPEDEF(soa_session);
tag_typedef_t nutag_soa_name = STRTAG_TYPEDEF(soa_name);
tag_typedef_t nutag_media_subsystem = PTRTAG_TYPEDEF(media_session);
tag_typedef_t nutag_media_session = PTRTAG_TYPEDEF(media_session);
......
......@@ -244,6 +244,27 @@ extern tag_typedef_t nutag_soa_session;
nutag_soa_session_ref, tag_ptr_vr(&(x),(x))
extern tag_typedef_t nutag_soa_session_ref;
/**Name for SDP Offer-Answer session object.
*
* SDP Offer-Answer session object name.
*
* @par Used with nua_create(), nua_handle().
*
* @par Parameter type
* void * (actually soa_session_t *)
*
* @par Values
* Pointer to MSS media session.
*
* Corresponding tag taking reference parameter is NUTAG_SOA_SESSION_REF.
*/
#define NUTAG_SOA_NAME(x) nutag_soa_name, tag_str_v(x)
extern tag_typedef_t nutag_soa_name;
#define NUTAG_SOA_NAME_REF(x) \
nutag_soa_name_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_soa_name_ref;
#else
/** Pointer to a media subsystem.
......
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