MT#55283 lightweight sdps

Change-Id: Ia6a576878873256bd47cf8f07d81c9d85e891cdc
master
Richard Fuchs 1 week ago
parent 279c59353a
commit 402a67ce2b

@ -5549,7 +5549,7 @@ static call_t *call_create(const str *callid) {
c->tags = str_ml_ht_new();
c->viabranches = str_ml_ht_new();
c->labels = str_ml_ht_new();
c->sdps = str_ml_ht_new();
c->sdps = alloc_str_ml_ht_new();
c->endpoints = endpoint_ml_ht_new();
call_memory_arena_set(c);
c->callid = memory_arena_str_cpy_lw(callid);

@ -647,7 +647,7 @@ static const char *call_offer_answer_ng(ng_command_ctx_t *ctx, const char *addr)
call_set_dtmf_block(call, from_ml, &flags);
if (flags.alias_key == AK_SDP)
t_hash_table_insert(call->sdps, call_str_dup(&sdp), from_ml);
t_hash_table_replace(call->sdps, memory_arena_str_dup_lw(&sdp), from_ml);
else if (flags.alias_key == AK_ADDRESS && streams.length && streams.head->data->rtp_endpoint.port)
t_hash_table_insert(call->endpoints, memory_arena_objdup(streams.head->data->rtp_endpoint),
from_ml);

@ -704,6 +704,8 @@ struct call_monologue {
typedef IQUEUE(struct call_monologue, link) monologues_in_call_q;
TYPED_GHASHTABLE(str_ml_ht, str, struct call_monologue, str_hash, str_equal, NULL, NULL)
TYPED_GHASHTABLE(alloc_str_ml_ht, str, struct call_monologue, str_hash, str_equal,
memory_arena_str_dup_free_lw, NULL)
struct sdp_fragment;
TYPED_GQUEUE(fragment, struct sdp_fragment)
@ -814,7 +816,7 @@ struct call {
str_ml_ht tags;
str_ml_ht viabranches;
str_ml_ht labels;
str_ml_ht sdps;
alloc_str_ml_ht sdps;
endpoint_ml_ht endpoints;
fragments_ht sdp_fragments;
streams_in_call_q streams;

Loading…
Cancel
Save