Commit 4a734858 authored by Pekka Pessi's avatar Pekka Pessi

nua: added backpointers to nua_dialog_usage_t and nua_dialog_state_t

darcs-hash:20070906163353-65a35-bf7c9c864d5bd2d4c6409b09401b05af7df61d1f.gz
parent 405dcb1f
......@@ -114,6 +114,7 @@ nua_handle_t *nh_create_handle(nua_t *nua,
nh->nh_nua = nua;
nh->nh_magic = hmagic;
nh->nh_prefs = nua->nua_dhandle->nh_prefs;
nh->nh_ds->ds_owner = nh;
if (nua_handle_save_tags(nh, tags) < 0) {
SU_DEBUG_5(("nua(%p): creating handle %p failed\n",
......
......@@ -288,6 +288,8 @@ nua_dialog_usage_t *nua_dialog_usage_add(nua_owner_t *own,
du = su_zalloc(own, sizeof *du + uclass->usage_size);
if (du) {
su_home_ref(own);
du->du_dialog = ds;
du->du_class = uclass;
du->du_event = o;
......@@ -301,7 +303,6 @@ nua_dialog_usage_t *nua_dialog_usage_add(nua_owner_t *own,
(void *)own, nua_dialog_usage_name(du),
o ? " with event " : "", o ? o->o_type :""));
su_home_ref(own);
du->du_next = ds->ds_usage, ds->ds_usage = du;
return du;
......
......@@ -319,6 +319,9 @@ struct nua_client_request
struct nua_dialog_state
{
/** Dialog owner */
nua_owner_t *ds_owner;
/** Dialog usages. */
nua_dialog_usage_t *ds_usage;
......@@ -387,6 +390,7 @@ typedef struct {
struct nua_dialog_usage {
nua_dialog_usage_t *du_next;
nua_usage_class const *du_class;
nua_dialog_state_t *du_dialog;
nua_client_request_t *du_cr; /**< Client request bound with usage */
unsigned du_ready:1; /**< Established usage */
......
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