diff --git a/daemon/call.c b/daemon/call.c index ccebeb34c..5e0fc934d 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -3721,7 +3721,6 @@ static void __call_free(void *p) { m = g_queue_pop_head(&c->monologues); g_queue_clear(&m->medias); - g_hash_table_destroy(m->other_tags); g_hash_table_destroy(m->associated_tags); g_hash_table_destroy(m->branches); g_hash_table_destroy(m->media_ids); @@ -3909,7 +3908,6 @@ struct call_monologue *__monologue_create(struct call *call) { ret->call = call; ret->created = rtpe_now.tv_sec; - ret->other_tags = g_hash_table_new(str_hash, str_equal); ret->associated_tags = g_hash_table_new(g_direct_hash, g_direct_equal); ret->branches = g_hash_table_new(str_hash, str_equal); ret->media_ids = g_hash_table_new(str_hash, str_equal); @@ -4105,19 +4103,6 @@ static unsigned int monologue_delete_iter(struct call_monologue *a, int delete_d return ret; } -/* must be called with call->master_lock held in W */ -static void __fix_other_tags(struct call_monologue *one) { - if (!one || !one->tag.len) - return; - - for (GList *sub = one->subscribers.head; sub; sub = sub->next) { - struct call_subscription *cs = sub->data; - struct call_monologue *two = cs->monologue; - g_hash_table_insert(one->other_tags, &two->tag, two); - g_hash_table_insert(two->other_tags, &one->tag, one); - } -} - /* must be called with call->master_lock held in W */ struct call_monologue *call_get_monologue(struct call *call, const str *fromtag) { return g_hash_table_lookup(call->tags, fromtag); @@ -4224,10 +4209,8 @@ ok_check_tag: struct call_monologue *csm = cs->monologue; if (!os) os = csm; - if (totag && totag->s && !csm->tag.s) { + if (totag && totag->s && !csm->tag.s) __monologue_tag(csm, totag); - __fix_other_tags(ret); - } break; // there should only be one // XXX check if there's more than a one-to-one mapping here? } @@ -4305,7 +4288,6 @@ tag_setup: dialogue_unkernelize(ft); dialogue_unkernelize(tt); __subscribe_offer_answer_both_ways(ft, tt); - __fix_other_tags(ft); done: __monologue_unkernelize(ft); diff --git a/daemon/redis.c b/daemon/redis.c index 2fb2ca7b4..48cf18736 100644 --- a/daemon/redis.c +++ b/daemon/redis.c @@ -1711,16 +1711,6 @@ static int json_link_tags(struct call *c, struct redis_list *tags, struct redis_ &(struct sink_attrs) { .offer_answer = true }); } - if (json_build_list(&q, c, "other_tags", i, tags, root_reader)) - return -1; - for (l = q.head; l; l = l->next) { - other_ml = l->data; - if (!other_ml) - return -1; - g_hash_table_insert(ml->other_tags, &other_ml->tag, other_ml); - } - g_queue_clear(&q); - if (json_build_list(&q, c, "associated_tags", i, tags, root_reader)) return -1; for (l = q.head; l; l = l->next) { @@ -2507,18 +2497,6 @@ char* redis_encode_json(struct call *c) { ml = l->data; // -- we do it again here since the jsonbuilder is linear straight forward // XXX these should all go into the above loop - k = g_hash_table_get_values(ml->other_tags); - snprintf(tmp, sizeof(tmp), "other_tags-%u", ml->unique_id); - json_builder_set_member_name(builder, tmp); - json_builder_begin_array (builder); - for (m = k; m; m = m->next) { - ml2 = m->data; - JSON_ADD_STRING("%u",ml2->unique_id); - } - json_builder_end_array (builder); - - g_list_free(k); - k = g_hash_table_get_values(ml->associated_tags); snprintf(tmp, sizeof(tmp), "associated_tags-%u", ml->unique_id); json_builder_set_member_name(builder, tmp); diff --git a/include/call.h b/include/call.h index 86ab1bae6..a65d8e3a5 100644 --- a/include/call.h +++ b/include/call.h @@ -452,7 +452,6 @@ struct call_monologue { enum termination_reason term_reason; const struct logical_intf *logical_intf; GHashTable *associated_tags; - GHashTable *other_tags; GHashTable *branches; GQueue subscriptions; // who am I subscribed to (sources) GHashTable *subscriptions_ht; // for quick lookup