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-24 18:51:02 +0100
commita2ca56b0f25b75bc6b5e8b0eda64bca09d0d4f87 (patch)
tree9ad7bf2d2498051a7f9e5e6a182d0e048e44aca9
parenta3ebfa26c31c0f81a60e6764cb7d5cd66b329c49 (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);
}
}