From 5926aacf9bfc308930645b1d5b4cb63cdf01f0ae Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 27 Feb 2026 10:37:46 -0400 Subject: [PATCH] MT#55283 combine identical HT types Change-Id: I49b1a1952ede3b34442e9982c91f0218024259d8 --- daemon/call.c | 6 +++--- include/call.h | 10 ++++------ t/test-transcode.c | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 4e6f2b545..c66bce7d4 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -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; diff --git a/include/call.h b/include/call.h index fa32dbd3d..d64155aff 100644 --- a/include/call.h +++ b/include/call.h @@ -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 */ diff --git a/t/test-transcode.c b/t/test-transcode.c index 3dede2f10..3fac81ac5 100644 --- a/t/test-transcode.c +++ b/t/test-transcode.c @@ -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);