MT#55283 combine identical HT types

Change-Id: I49b1a1952ede3b34442e9982c91f0218024259d8
pull/2079/head
Richard Fuchs 2 months ago
parent 1f7d9e5bc9
commit 5926aacf9b

@ -5113,9 +5113,9 @@ static call_t *call_create(const str *callid) {
c = obj_alloc0(call_t, __call_free);
memory_arena_init(&c->buffer);
rwlock_init(&c->master_lock);
c->tags = tags_ht_new();
c->viabranches = tags_ht_new();
c->labels = labels_ht_new();
c->tags = str_ml_ht_new();
c->viabranches = str_ml_ht_new();
c->labels = str_ml_ht_new();
call_memory_arena_set(c);
c->callid = call_str_cpy(callid);
c->created = rtpe_now;

@ -670,7 +670,7 @@ struct call_monologue {
TYPED_GQUEUE(monologues, struct call_monologue)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(monologues_q, monologues_q_clear)
TYPED_GHASHTABLE(tags_ht, str, struct call_monologue, str_hash, str_equal, NULL, NULL)
TYPED_GHASHTABLE(str_ml_ht, str, struct call_monologue, str_hash, str_equal, NULL, NULL)
struct sdp_fragment;
TYPED_GQUEUE(fragment, struct sdp_fragment)
@ -726,8 +726,6 @@ struct call_iterator_entry {
} while (0)
TYPED_GHASHTABLE(labels_ht, str, struct call_monologue, str_hash, str_equal, NULL, NULL)
/**
* call_t is the main parent structure of all call-related objects.
*
@ -778,9 +776,9 @@ struct call {
/* everything below is protected by the master_lock */
monologues_q monologues; /* call_monologue */
medias_q medias; /* call_media */
tags_ht tags;
tags_ht viabranches;
labels_ht labels;
str_ml_ht tags;
str_ml_ht viabranches;
str_ml_ht labels;
fragments_ht sdp_fragments;
packet_stream_q streams;
stream_fd_q stream_fds; /* stream_fd */

@ -97,7 +97,7 @@ static void __start(const char *file, int line) {
call.obj.magic = OBJ_MAGIC;
#endif
obj_hold(&call);
call.tags = tags_ht_new();
call.tags = str_ml_ht_new();
call.callid = STR("test-call");
bencode_buffer_init(&call.buffer);
call_memory_arena_set(&call);

Loading…
Cancel
Save