Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion daemon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ endif
CFLAGS += $(CFLAGS_MQTT)
LDLIBS += $(LDLIBS_MQTT)

SRCS := main.c kernel.c helpers.c control_tcp.c call.c control_udp.c redis.c \
SRCS := main.c kernel.c helpers.c control_tcp.c call.c call_checkpoint.c control_udp.c redis.c \
cookie_cache.c udp_listener.c control_ng_flags_parser.c control_ng.c sdp.strhash.c stun.c rtcp.c \
crypto.c rtp.c call_interfaces.c dtls.c log.c cli.strhash.c graphite.c ice.c \
media_socket.c homer.c recording.c statistics.c cdr.c ssrc.c iptables.c tcp_listener.c \
Expand Down
11 changes: 6 additions & 5 deletions daemon/call.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "call.h"
#include "call_checkpoint.h"

#include <stdio.h>
#include <unistd.h>
Expand Down Expand Up @@ -69,7 +70,6 @@ static int64_t add_ongoing_calls_dur_in_interval(int64_t interval_start, int64_t
static void __call_free(call_t *p);
static void __call_cleanup(call_t *c);
static void __monologue_stop(struct call_monologue *ml);
static void media_stop(struct call_media *m);
__attribute__((nonnull(1, 2, 4)))
static struct media_subscription *__subscribe_medias_both_ways(struct call_media * a, struct call_media * b,
bool is_offer, medias_q *);
Expand Down Expand Up @@ -5182,7 +5182,7 @@ static void __call_cleanup(call_t *c) {
for (__auto_type l = c->medias.head; l; l = l->next) {
struct call_media *md = l->data;
ice_shutdown(&md->ice_agent);
media_stop(md);
call_media_stop(md);
t38_gateway_put(&md->t38_gateway);
audio_player_free(md);
mutex_destroy(&md->dtmf_lock);
Expand Down Expand Up @@ -5498,6 +5498,7 @@ static void __call_free(call_t *c) {

//ilog(LOG_DEBUG, "freeing main call struct");

call_checkpoint_free_all(c);
obj_release(c->dtls_cert);
mqtt_timer_stop(&c->mqtt_timer);

Expand Down Expand Up @@ -6418,7 +6419,7 @@ int call_get_mono_dialogue(struct call_monologue *monologues[2],
return call_get_dialogue(monologues, call, callid, fromtag, totag, viabranch, flags, ep);
}

static void media_stop(struct call_media *m) {
void call_media_stop(struct call_media *m) {
if (!m)
return;
t38_gateway_stop(m->t38_gateway);
Expand All @@ -6443,7 +6444,7 @@ static void monologue_stop(struct call_monologue *ml, bool stop_media_subscriber
__monologue_stop(ml);
for (unsigned int i = 0; i < ml->medias->len; i++)
{
media_stop(ml->medias->pdata[i]);
call_media_stop(ml->medias->pdata[i]);
}
/* monologue's subscribers */
if (stop_media_subscribers) {
Expand All @@ -6453,7 +6454,7 @@ static void monologue_stop(struct call_monologue *ml, bool stop_media_subscriber
if (!media)
continue;
IQUEUE_FOREACH(&media->media_subscribers, ms) {
media_stop(ms->media);
call_media_stop(ms->media);
__monologue_stop(ms->monologue);
}
}
Expand Down
Loading
Loading