From a14cf184adc9b02bf92f2ac60b17399896d0d0a4 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 24 Sep 2024 09:33:26 -0400 Subject: [PATCH] MT#55283 obsolete buffer_lock This should be protected by the master_lock already. Change-Id: I5369546803c2b5ca9cb821ac7f8d3e7246d6af87 --- daemon/call.c | 2 -- include/call.h | 3 --- 2 files changed, 5 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 00fe95282..26949ba99 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -4104,7 +4104,6 @@ static void __call_free(void *p) { } call_buffer_free(&c->buffer); - mutex_destroy(&c->buffer_lock); rwlock_destroy(&c->master_lock); assert(c->stream_fds.head == NULL); @@ -4115,7 +4114,6 @@ static call_t *call_create(const str *callid) { ilog(LOG_NOTICE, "Creating new call"); c = obj_alloc0("call", sizeof(*c), __call_free); - mutex_init(&c->buffer_lock); call_buffer_init(&c->buffer); rwlock_init(&c->master_lock); c->tags = tags_ht_new(); diff --git a/include/call.h b/include/call.h index d687507fa..cd7eb9b2f 100644 --- a/include/call.h +++ b/include/call.h @@ -712,7 +712,6 @@ struct call { */ struct obj obj; - mutex_t buffer_lock; call_buffer_t buffer; // use a single poller for all sockets within the call @@ -862,9 +861,7 @@ const rtp_payload_type *__rtp_stats_codec(struct call_media *m); INLINE void *call_malloc(size_t l) { void *ret; - mutex_lock(&call_memory_arena->buffer_lock); ret = call_buffer_alloc(&call_memory_arena->buffer, l); - mutex_unlock(&call_memory_arena->buffer_lock); return ret; }