summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-24 18:47:25 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-26 06:22:06 +0100
commit153ebbf6e28ecda275ff00212affa4a46e1d4ed6 (patch)
tree54a12db28e1e2eb65cd1b24a2fde87e0e3c8aff6
parentaa41b0aafc5e4776ccfcfc35202e6964767abdc2 (diff)
call: Change to past tense and move code after the free
Reading the "releasing" log output sounded like one more message had been sent and this code is waiting for something. Take a copy of the call id and then print that the call has been released.
-rw-r--r--src/call.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/call.c b/src/call.c
index c6d10ea..d9ca66e 100644
--- a/src/call.c
+++ b/src/call.c
@@ -48,9 +48,10 @@ void call_leg_release(struct call_leg *leg)
talloc_free(leg);
if (!call->initial && !call->remote) {
- LOGP(DAPP, LOGL_DEBUG, "call(%u) releasing.\n", call->id);
+ uint32_t id = call->id;
llist_del(&call->entry);
talloc_free(call);
+ LOGP(DAPP, LOGL_DEBUG, "call(%u) released.\n", id);
}
}