laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/36036?usp=email )
Change subject: ipa_keepalive: Make FSM a bit less quiet ......................................................................
ipa_keepalive: Make FSM a bit less quiet
Let's make sure we log meaningful log messages whenever an IPA keepalive FSM is started, stopped or if it times out. This allows the user to observe whether IPA keepalive is actually enabled (using what timeout), and also to learn why exactly the connection was dropped.
Change-Id: Iad20b86f893c1036affaf14f978099fa858a0031 Related: SYS#6801 --- M src/input/ipa_keepalive.c 1 file changed, 20 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/input/ipa_keepalive.c b/src/input/ipa_keepalive.c index 7fc28f1..de68879 100644 --- a/src/input/ipa_keepalive.c +++ b/src/input/ipa_keepalive.c @@ -147,6 +147,7 @@ ifp->params.wait_for_resp, T_PONG_NOT_RECEIVED); return 0; case T_PONG_NOT_RECEIVED: + LOGPFSML(fi, LOGL_NOTICE, "IPA keep-alive FSM timed out: PONG not received\n"); /* PONG not received within time */ if (ifp->srv_conn) conn = ifp->srv_conn; @@ -320,7 +321,10 @@ /*! Start the ping/pong procedure of the IPA Keepalive FSM. */ void ipa_keepalive_fsm_start(struct osmo_fsm_inst *fi) { + struct ipa_fsm_priv *ifp = fi->priv; OSMO_ASSERT(fi->fsm == &ipa_keepalive_fsm); + LOGPFSML(fi, LOGL_INFO, "Starting IPA keep-alive FSM (interval=%us wait=%us)\n", + ifp->params.interval, ifp->params.wait_for_resp); osmo_fsm_inst_dispatch(fi, OSMO_IPA_KA_E_START, NULL); }
@@ -328,5 +332,6 @@ void ipa_keepalive_fsm_stop(struct osmo_fsm_inst *fi) { OSMO_ASSERT(fi->fsm == &ipa_keepalive_fsm); + LOGPFSML(fi, LOGL_INFO, "Stopping IPA keep-alive FSM\n"); osmo_fsm_inst_dispatch(fi, OSMO_IPA_KA_E_STOP, NULL); }