summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith <keith@rhizomatica.org>2018-10-02 13:23:00 +0100
committerKeith <keith@rhizomatica.org>2018-10-02 13:24:53 +0100
commitd195c09228bad4626d2136c10c484a276016bf8a (patch)
tree1afcea5c700f0105e12a43a45896f26720c42f9e
parent8a695c42a8472e6c636976c0d451524efef24d3b (diff)
Logging: Further use of osmo_mncc_name() in logging
Use osmo_mncc_name() in timer functions and in logging the type of MNCC message sent to the socket. Change-Id: Ic77e0d86c91c29ff7304e620fdecb69b22127d33
-rw-r--r--src/mncc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mncc.c b/src/mncc.c
index 1b44e05..976a671 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -65,20 +65,21 @@ static void start_cmd_timer(struct mncc_call_leg *leg, uint32_t expected_next)
leg->cmd_timeout.cb = cmd_timeout;
leg->cmd_timeout.data = leg;
+ LOGP(DMNCC, LOGL_DEBUG, "Starting Timer for %s\n", osmo_mncc_name(expected_next));
osmo_timer_schedule(&leg->cmd_timeout, 5, 0);
}
static void stop_cmd_timer(struct mncc_call_leg *leg, uint32_t got_res)
{
if (leg->rsp_wanted != got_res) {
- LOGP(DMNCC, LOGL_ERROR, "Wanted rsp(%u) but got(%u) for leg(%u)\n",
- leg->rsp_wanted, got_res, leg->callref);
+ LOGP(DMNCC, LOGL_ERROR, "Wanted rsp(%s) but got(%s) for leg(%u)\n",
+ osmo_mncc_name(leg->rsp_wanted), osmo_mncc_name(got_res), leg->callref);
return;
}
LOGP(DMNCC, LOGL_DEBUG,
- "Got response(0x%x), stopping timer on leg(%u)\n",
- got_res, leg->callref);
+ "Got response(%s), stopping timer on leg(%u)\n",
+ osmo_mncc_name(got_res), leg->callref);
osmo_timer_del(&leg->cmd_timeout);
}
@@ -127,6 +128,7 @@ static void mncc_write(struct mncc_connection *conn, struct gsm_mncc *mncc, uint
* static struct?
*/
rc = write(conn->fd.fd, mncc, sizeof(*mncc));
+ LOGP(DMNCC, LOGL_DEBUG, "MNCC sent message type: %s\n", osmo_mncc_name(mncc->msg_type));
if (rc != sizeof(*mncc)) {
LOGP(DMNCC, LOGL_ERROR, "Failed to send message call(%u)\n", callref);
close_connection(conn);