From 7709ea0ba264b61a9c1f28d59e54868afcee0599 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 13 Aug 2023 15:02:01 +0200 Subject: [PATCH] Whenever we have a FSM around, use LOGPFSML instead of LOGP This provides context in the log lines, so we can see which instance of a given fsm / process is logging information --- src/v52_le_bcc_fsm.c | 6 +-- src/v52_le_lcp_fsm.c | 26 ++++++------- src/v52_le_pp_fsm.c | 14 +++---- src/v5x_le_ctrl_fsm.c | 24 ++++++------ src/v5x_le_management.c | 82 ++++++++++++++++++++--------------------- src/v5x_le_port_fsm.c | 10 ++--- src/v5x_le_pstn_fsm.c | 48 ++++++++++++------------ 7 files changed, 105 insertions(+), 105 deletions(-) diff --git a/src/v52_le_bcc_fsm.c b/src/v52_le_bcc_fsm.c index a6df747..ac4b10c 100644 --- a/src/v52_le_bcc_fsm.c +++ b/src/v52_le_bcc_fsm.c @@ -731,7 +731,7 @@ int v52_le_bcc_dl_rcv(struct v5x_interface *v5if, uint16_t l3_addr, uint8_t msg_ /* handle AN fault here, so there is no need to create a process */ if (msg_type == V52_CTRL_MSGT_AN_FAULT) { - LOGP(DV5BCC, LOGL_NOTICE, "Replying to AN FAULT message. No action is taken here.\n"); + LOGPFSML(bcc->fi, LOGL_NOTICE, "Replying to AN FAULT message. No action is taken here.\n"); /* Send AN FAULT ACK */ v5x_dl_snd(v5if, V52_DLADDR_BCC, v52_enc_an_fault_ack(ref, source_id)); return 0; @@ -764,7 +764,7 @@ int v52_le_bcc_dl_rcv(struct v5x_interface *v5if, uint16_t l3_addr, uint8_t msg_ osmo_fsm_inst_dispatch(bcc->fi, V52_BCCFSM_E_PROTOCOL_ERROR, (void *)tp); break; default: - LOGP(DV5BCC, LOGL_NOTICE, "Invalid BCC protocol message %d receied from AN.\n", msg_type); + LOGPFSML(bcc->fi, LOGL_NOTICE, "Invalid BCC protocol message %d receied from AN.\n", msg_type); return -EINVAL; } @@ -805,7 +805,7 @@ int v52_le_bcc_mdu_snd(struct v5x_interface *v5if, uint16_t user_port_id, bool i osmo_fsm_inst_dispatch(bcc->fi, V52_BCCFSM_E_MDU_BCC_audit_req, NULL); break; default: - LOGP(DV5BCC, LOGL_NOTICE, "Invalid BCC protocol message %d receied from AN.\n", prim); + LOGPFSML(bcc->fi, LOGL_NOTICE, "Invalid BCC protocol message %d receied from AN.\n", prim); return -EINVAL; } diff --git a/src/v52_le_lcp_fsm.c b/src/v52_le_lcp_fsm.c index ca23d89..a7c54b5 100644 --- a/src/v52_le_lcp_fsm.c +++ b/src/v52_le_lcp_fsm.c @@ -820,39 +820,39 @@ int v52_le_lcp_mph_rcv(struct v5x_link *v5l, enum v5x_mph_prim prim) switch (prim) { case MPH_AI: - LOGP(DV5LCP, LOGL_NOTICE, "Received link activation indication from L1 (link ID %d).\n", v5l->id); + LOGPFSML(v5l->fi, LOGL_NOTICE, "Received link activation indication from L1 (link ID %d).\n", v5l->id); event = V52_LCPFSM_E_MPH_AI; break; case MPH_DI: - LOGP(DV5LCP, LOGL_NOTICE, "Received link deactivation indication from L1 (link ID %d).\n", v5l->id); + LOGPFSML(v5l->fi, LOGL_NOTICE, "Received link deactivation indication from L1 (link ID %d).\n", v5l->id); event = V52_LCPFSM_E_MPH_DI; break; case MPH_EIa: - LOGP(DV5LCP, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): LOS\n", v5l->id); + LOGPFSML(v5l->fi, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): LOS\n", v5l->id); return 0; case MPH_EIb: - LOGP(DV5LCP, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): RAI\n", v5l->id); + LOGPFSML(v5l->fi, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): RAI\n", v5l->id); return 0; case MPH_EIc: - LOGP(DV5LCP, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): AIS\n", v5l->id); + LOGPFSML(v5l->fi, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): AIS\n", v5l->id); return 0; case MPH_EId: - LOGP(DV5LCP, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): Internal failure\n", + LOGPFSML(v5l->fi, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): Internal failure\n", v5l->id); return 0; case MPH_EIe: - LOGP(DV5LCP, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): CRC error\n", v5l->id); + LOGPFSML(v5l->fi, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): CRC error\n", v5l->id); return 0; case MPH_EIf: - LOGP(DV5LCP, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): " + LOGPFSML(v5l->fi, LOGL_DEBUG, "Received link error indication from L1 (link ID %d): " "Remote CRC error indication\n", v5l->id); return 0; case MPH_IDI: - LOGP(DV5LCP, LOGL_NOTICE, "Received link identification indication from L1 (link ID %d).\n", v5l->id); + LOGPFSML(v5l->fi, LOGL_NOTICE, "Received link identification indication from L1 (link ID %d).\n", v5l->id); event = V52_LCPFSM_E_MPH_IDI; break; case MPH_EIg: - LOGP(DV5LCP, LOGL_NOTICE, "Received link identification failure from L1 (link ID %d).\n", v5l->id); + LOGPFSML(v5l->fi, LOGL_NOTICE, "Received link identification failure from L1 (link ID %d).\n", v5l->id); event = V52_LCPFSM_E_MPH_EIg; break; case MPH_EIdr: @@ -860,7 +860,7 @@ int v52_le_lcp_mph_rcv(struct v5x_link *v5l, enum v5x_mph_prim prim) case MPH_EIbr: return 0; default: - LOGP(DV5LCP, LOGL_NOTICE, "Invalid LCP primitive %d receied from L1/AN (link ID %d).\n", prim, v5l->id); + LOGPFSML(v5l->fi, LOGL_NOTICE, "Invalid LCP primitive %d receied from L1/AN (link ID %d).\n", prim, v5l->id); return -EINVAL; } @@ -901,7 +901,7 @@ int v52_le_lcp_fe_rcv(struct v5x_link *v5l, enum v52_link_ctrl_func lcf) event = V52_LCPFSM_E_FE306; break; default: - LOGP(DV5LCP, LOGL_NOTICE, "Invalid link control function primitive %d receied from AN.\n", lcf); + LOGPFSML(v5l->fi, LOGL_NOTICE, "Invalid link control function primitive %d receied from AN.\n", lcf); return -EINVAL; } @@ -931,7 +931,7 @@ int v52_le_lcp_mdu_snd(struct v5x_link *v5l, enum v5x_mgmt_prim prim) event = V52_LCPFSM_E_MDU_LBI; break; default: - LOGP(DV5LCP, LOGL_NOTICE, "Invalid MDU primitive %d receied from management.\n", prim); + LOGPFSML(v5l->fi, LOGL_NOTICE, "Invalid MDU primitive %d receied from management.\n", prim); return -EINVAL; } diff --git a/src/v52_le_pp_fsm.c b/src/v52_le_pp_fsm.c index 134f64e..09fef17 100644 --- a/src/v52_le_pp_fsm.c +++ b/src/v52_le_pp_fsm.c @@ -257,7 +257,7 @@ static struct msgb *v52_enc_reset_sn_xxx(uint16_t cc_id, uint8_t msg_type) static void stop_timer(struct osmo_fsm_inst *fi) { - LOGP(DV5PP, LOGL_DEBUG, "Stop all timers\n"); + LOGPFSML(fi, LOGL_DEBUG, "Stop all timers\n"); osmo_timer_del(&fi->timer); } @@ -295,7 +295,7 @@ static void start_timer(struct osmo_fsm_inst *fi, enum v52_le_pp_fsm_event event if (info) memcpy(&pp->info, info, sizeof(*info)); - LOGP(DV5PP, LOGL_DEBUG, "Start timer %s (count = %d)\n", timer_name, count); + LOGPFSML(fi, LOGL_DEBUG, "Start timer %s (count = %d)\n", timer_name, count); pp->timeout_event = event; pp->timeout_count = count; osmo_timer_schedule(&fi->timer, timeout / 1000, timeout % 1000); @@ -768,12 +768,12 @@ int v52_le_pp_dl_rcv(struct v5x_link *v5l, uint16_t cc_id, uint8_t msg_type, con event = V52_PPFSM_E_RESET_SN_ACK; break; default: - LOGP(DV5PP, LOGL_NOTICE, "Invalid Protection protocol message %d receied from AN.\n", msg_type); + LOGPFSML(pp->fi, LOGL_NOTICE, "Invalid Protection protocol message %d receied from AN.\n", msg_type); return -EINVAL; } if (cc_id != pp->interface->protection.cc_id) { - LOGP(DV5PP, LOGL_NOTICE, "Protection protocol of AN uses CC-ID %d, but we use CC-ID %d. Please check provisioning.\n", cc_id, pp->interface->protection.cc_id); + LOGPFSML(pp->fi, LOGL_NOTICE, "Protection protocol of AN uses CC-ID %d, but we use CC-ID %d. Please check provisioning.\n", cc_id, pp->interface->protection.cc_id); dl_send(pp->fi, v52_enc_protocol_error(pp, pp->interface->protection.cc_id, V5X_CAUSE_T_REF_NR_CODING_ERROR, NULL, 0)); return -EINVAL; } @@ -794,7 +794,7 @@ int v52_le_pp_dl_rcv(struct v5x_link *v5l, uint16_t cc_id, uint8_t msg_type, con diff = (seq_nr - pp->vp_r) & 0x7f; /* if VP(R)-5 <= SN <= VP(R)-1 (SN is 1..5 values lower than we want) */ if (diff >= 128 - 5) { - LOGP(DV5PP, LOGL_DEBUG, "Receiveds message with sequence %d, while we expect %d. Ignore, because it was already received earlier.\n", seq_nr, pp->vp_r); + LOGPFSML(pp->fi, LOGL_DEBUG, "Receiveds message with sequence %d, while we expect %d. Ignore, because it was already received earlier.\n", seq_nr, pp->vp_r); return 0; } /* if VP(R) <= SN <= VP(R) + 4 (SN is 0..4 higher than we want) */ @@ -802,7 +802,7 @@ int v52_le_pp_dl_rcv(struct v5x_link *v5l, uint16_t cc_id, uint8_t msg_type, con /* set received sequence number to the next one expected and deliver message */ pp->vp_r = (seq_nr + 1) & 0x7f; } else { - LOGP(DV5PP, LOGL_NOTICE, "Receiveds message with sequence %d, while we expect %d. This a a misalignment, perform an SN reset!\n", seq_nr, pp->vp_r); + LOGPFSML(pp->fi, LOGL_NOTICE, "Receiveds message with sequence %d, while we expect %d. This a a misalignment, perform an SN reset!\n", seq_nr, pp->vp_r); event = V52_PPFSM_E_VP_S_VP_R_misalignment_detected; } } @@ -836,7 +836,7 @@ int v52_le_pp_mdu_snd(struct v5x_interface *v5if, enum v5x_mgmt_prim prim, uint8 event = V52_PPFSM_E_MDU_Protection_reset_SN_req; break; default: - LOGP(DV5PP, LOGL_NOTICE, "Invalid MDU primitive %d receied from management.\n", prim); + LOGPFSML(v5if->protection.pp->fi, LOGL_NOTICE, "Invalid MDU primitive %d receied from management.\n", prim); return -EINVAL; } diff --git a/src/v5x_le_ctrl_fsm.c b/src/v5x_le_ctrl_fsm.c index 077073c..6a95c09 100644 --- a/src/v5x_le_ctrl_fsm.c +++ b/src/v5x_le_ctrl_fsm.c @@ -99,7 +99,7 @@ static void v5x_ctrl_mdu(struct osmo_fsm_inst *fi, const struct tlv_parsed *tp) rej_cause = 0; interface_id = 0; - LOGP(DV5CTRL, LOGL_DEBUG, "MDU-CTRL received.\n"); + LOGPFSML(fi, LOGL_DEBUG, "MDU-CTRL received.\n"); if (TLVP_PRESENT(tp, V5X_CTRL_IEI_VARIANT)) variant = *TLVP_VAL(tp, V5X_CTRL_IEI_VARIANT) & 0x7f; @@ -113,7 +113,7 @@ static void v5x_ctrl_mdu(struct osmo_fsm_inst *fi, const struct tlv_parsed *tp) cfe = *TLVP_VAL(tp, V5X_CTRL_IEI_CTRL_F_ELEMENT) & 0x7f; perf_grading = 0; - LOGP(DV5CTRL, LOGL_DEBUG, "FE received for address %d.\n", v5up->nr); + LOGPFSML(fi, LOGL_DEBUG, "FE received for address %d.\n", v5up->nr); if (TLVP_PRESENT(tp, V5X_CTRL_IEI_PERFORMANCE_GRADING)) perf_grading = *TLVP_VAL(tp, V5X_CTRL_IEI_PERFORMANCE_GRADING) & 0x0f; @@ -129,7 +129,7 @@ static void v5x_ctrl_mdu(struct osmo_fsm_inst *fi, const struct tlv_parsed *tp) case V5X_CTRL_TYPE_LINK: lcf = *TLVP_VAL(tp, V52_CTRL_IEI_LCP_LINK_CTRL_FUNCTION) & 0x7f; - LOGP(DV5CTRL, LOGL_DEBUG, "FE received for link ID %d.\n", v5l->id); + LOGPFSML(fi, LOGL_DEBUG, "FE received for link ID %d.\n", v5l->id); v52_le_lcp_fe_rcv(v5l, lcf); break; @@ -137,9 +137,9 @@ static void v5x_ctrl_mdu(struct osmo_fsm_inst *fi, const struct tlv_parsed *tp) } /* display MDU-error_indication */ -static void v5x_mdu_error(struct osmo_fsm_inst __attribute__((unused)) *fi, const char *error) +static void v5x_mdu_error(struct osmo_fsm_inst *fi, const char *error) { - LOGP(DV5CTRL, LOGL_NOTICE, "MDU-error_indication: %s\n", error); + LOGPFSML(fi, LOGL_NOTICE, "MDU-error_indication: %s\n", error); } /* send control towards lower (DL) layer */ @@ -152,7 +152,7 @@ static void v5x_ctrl_send(struct v5x_ctrl_proto *ctrl, struct msgb *msg) switch (fi->state) { case V5X_CTRL_ST_IN_SERVICE: - LOGP(DV5CTRL, LOGL_DEBUG, "We are in service, so we send our message now.\n"); + LOGPFSML(fi, LOGL_DEBUG, "We are in service, so we send our message now.\n"); /* no message, clone current message and store to be repeated */ ctrl->tx_msg = msgb_copy(msg, NULL); /* go to AWAIT_PENDING_ACK */ @@ -175,7 +175,7 @@ static void v5x_ctrl_send(struct v5x_ctrl_proto *ctrl, struct msgb *msg) #endif break; case V5X_CTRL_ST_AWAIT_ACK: - LOGP(DV5CTRL, LOGL_DEBUG, "We are waiting for ack, so we queue our message.\n"); + LOGPFSML(fi, LOGL_DEBUG, "We are waiting for ack, so we queue our message.\n"); /* pending message, save message in queue */ msgb_enqueue(&ctrl->tx_queue, msg); break; @@ -188,7 +188,7 @@ static void v5x_ctrl_ack(struct osmo_fsm_inst *fi, const struct tlv_parsed __att struct v5x_ctrl_proto *ctrl = fi->priv; struct msgb *msg; - LOGP(DV5CTRL, LOGL_DEBUG, "Received acknowledge, removing pending message, if any.\n"); + LOGPFSML(fi, LOGL_DEBUG, "Received acknowledge, removing pending message, if any.\n"); /* free pending copy of message, if acked before retry */ if (ctrl->tx_msg) { msgb_free(ctrl->tx_msg); @@ -199,7 +199,7 @@ static void v5x_ctrl_ack(struct osmo_fsm_inst *fi, const struct tlv_parsed __att /* sending next pending message in queue */ msg = msgb_dequeue(&ctrl->tx_queue); if (msg) { - LOGP(DV5CTRL, LOGL_DEBUG, "Found pending message in queue.\n"); + LOGPFSML(fi, LOGL_DEBUG, "Found pending message in queue.\n"); v5x_ctrl_send(ctrl, msg); } } @@ -231,7 +231,7 @@ static int v5x_ctrl_fsm_timer_cb(struct osmo_fsm_inst *fi) struct msgb *msg; if (ctrl->tx_msg) { - LOGP(DV5CTRL, LOGL_DEBUG, "Timer fired the first time, resending message.\n"); + LOGPFSML(fi, LOGL_DEBUG, "Timer fired the first time, resending message.\n"); /* first expiry: repeat CONTROL; re-start T01 */ /* send message towards DL */ osmo_timer_schedule(&fi->timer, TIMEOUT, 0); @@ -249,14 +249,14 @@ static int v5x_ctrl_fsm_timer_cb(struct osmo_fsm_inst *fi) break; } } else { - LOGP(DV5CTRL, LOGL_DEBUG, "Timer fired the second time, indicate an error.\n"); + LOGPFSML(fi, LOGL_DEBUG, "Timer fired the second time, indicate an error.\n"); /* second expiry: send MDU-error_ind; go to IN_SERVICE */ v5x_mdu_error(fi, "Second timeout while waiting for CONTROL ACK."); osmo_fsm_inst_state_chg(fi, V5X_CTRL_ST_IN_SERVICE, 0, 0); /* sending next pending message in queue */ msg = msgb_dequeue(&ctrl->tx_queue); if (msg) { - LOGP(DV5CTRL, LOGL_DEBUG, "Found pending message in queue.\n"); + LOGPFSML(fi, LOGL_DEBUG, "Found pending message in queue.\n"); v5x_ctrl_send(ctrl, msg); } } diff --git a/src/v5x_le_management.c b/src/v5x_le_management.c index 9b5f1bc..639b857 100644 --- a/src/v5x_le_management.c +++ b/src/v5x_le_management.c @@ -633,11 +633,11 @@ static void system_lesys0_system_startup(struct osmo_fsm_inst *fi, uint32_t even switch (event) { case V5X_LE_SYSTEM_E_START: - LOGP(DV5MGMT, LOGL_INFO, "Perform system startup\n"); + LOGPFSML(fi, LOGL_INFO, "Perform system startup\n"); system_startup(mgmt); break; case V5X_LE_SYSTEM_E_CONTROL_DL_ESTABLISHED: - LOGP(DV5MGMT, LOGL_INFO, "Establishment of control DL success.\n"); + LOGPFSML(fi, LOGL_INFO, "Establishment of control DL success.\n"); /* new state */ osmo_fsm_inst_state_chg(fi, V5X_LE_SYSTEM_S_LESYS1_WAIT_VARIANT_AND_ID, 0, 0); /* start traffic to CONTROL_COMMON and CONTROL_PORT FSM */ @@ -645,11 +645,11 @@ static void system_lesys0_system_startup(struct osmo_fsm_inst *fi, uint32_t even /* start timer TV1 */ start_timer_tv1(mgmt); /* request variant and ID */ - LOGP(DV5MGMT, LOGL_INFO, "Requesting variant and interface ID.\n"); + LOGPFSML(fi, LOGL_INFO, "Requesting variant and interface ID.\n"); v5x_le_ctrl_common_snd(v5if, V5X_CTRL_ID_REQUEST_VARIANT_AND_INTERFACE_ID, NULL, NULL, NULL); break; case V5X_LE_SYSTEM_E_CONTROL_DL_RELEASED: - LOGP(DV5MGMT, LOGL_ERROR, "Establishment of control DL failed.\n"); + LOGPFSML(fi, LOGL_ERROR, "Establishment of control DL failed.\n"); /* re-establish DL */ if (mgmt->do_est) lapv5_dl_est_req(v5if->control.li, V5X_DLADDR_CTRL); @@ -668,7 +668,7 @@ static void system_lesys1_wait_variant_and_id(struct osmo_fsm_inst *fi, uint32_t switch (event) { case V5X_LE_SYSTEM_E_VARIANT_AND_ID: vi = data; - LOGP(DV5MGMT, LOGL_INFO, "AN replies variant and interface ID. (variant = %d, interface_id = %d)\n", + LOGPFSML(fi, LOGL_INFO, "AN replies variant and interface ID. (variant = %d, interface_id = %d)\n", vi->variant, vi->interface_id); /* stop timer TV1 */ stop_timer_tv1(mgmt); @@ -678,17 +678,17 @@ static void system_lesys1_wait_variant_and_id(struct osmo_fsm_inst *fi, uint32_t v5if->id_remote = vi->interface_id; v5if->id_remote_valid = true; if (v5if->variant_remote != v5if->variant) { - LOGP(DV5MGMT, LOGL_ERROR, "Variant does not match: AN(%d) != LE(%d)\n", - v5if->variant_remote, v5if->variant); + LOGPFSML(fi, LOGL_ERROR, "Variant does not match: AN(%d) != LE(%d)\n", + v5if->variant_remote, v5if->variant); } if (v5if->id_remote != v5if->id) { - LOGP(DV5MGMT, LOGL_ERROR, "Interface ID does not match: AN(%d) != LE(%d)\n", - v5if->id_remote, v5if->id); + LOGPFSML(fi, LOGL_ERROR, "Interface ID does not match: AN(%d) != LE(%d)\n", + v5if->id_remote, v5if->id); } if (v5if->variant_remote != v5if->variant || v5if->id_remote != v5if->id) { - LOGP(DV5MGMT, LOGL_ERROR, "************************************************************\n"); - LOGP(DV5MGMT, LOGL_ERROR, "You must set matching Variant and Interface ID at AN and LE!\n"); - LOGP(DV5MGMT, LOGL_ERROR, "************************************************************\n"); + LOGPFSML(fi, LOGL_ERROR, "************************************************************\n"); + LOGPFSML(fi, LOGL_ERROR, "You must set matching Variant and Interface ID at AN and LE!\n"); + LOGPFSML(fi, LOGL_ERROR, "************************************************************\n"); /* disable LAPV5 DLs */ disable_lapv5(mgmt); /* new state */ @@ -723,7 +723,7 @@ static void system_lesys1_wait_variant_and_id(struct osmo_fsm_inst *fi, uint32_t /* ignore */ break; case V5X_LE_SYSTEM_E_CONTROL_DL_RELEASED: - LOGP(DV5MGMT, LOGL_ERROR, "Establishment of control DL failed.\n"); + LOGPFSML(fi, LOGL_ERROR, "Establishment of control DL failed.\n"); /* stop timer TV1 */ stop_timer_tv1(mgmt); /* new state */ @@ -746,7 +746,7 @@ static void system_lesys2_in_service(struct osmo_fsm_inst *fi, uint32_t event, v /* ignore */ break; case V5X_LE_SYSTEM_E_CONTROL_DL_RELEASED: - LOGP(DV5MGMT, LOGL_ERROR, "Establishment of control DL failed.\n"); + LOGPFSML(fi, LOGL_ERROR, "Establishment of control DL failed.\n"); /* start timer TC1 */ start_timer_tc1(mgmt); /* new state */ @@ -768,7 +768,7 @@ static void system_lesys3_control_dl_released_1(struct osmo_fsm_inst *fi, uint32 switch (event) { case V5X_LE_SYSTEM_E_CONTROL_DL_ESTABLISHED: - LOGP(DV5MGMT, LOGL_INFO, "Establishment of control DL success.\n"); + LOGPFSML(fi, LOGL_INFO, "Establishment of control DL success.\n"); /* stop timer TC1 */ stop_timer_tc1(mgmt); /* new state */ @@ -780,7 +780,7 @@ static void system_lesys3_control_dl_released_1(struct osmo_fsm_inst *fi, uint32 lapv5_dl_est_req(v5if->control.li, V5X_DLADDR_CTRL); break; case V5X_LE_SYSTEM_E_TIMEOUT_TC1: - LOGP(DV5MGMT, LOGL_ERROR, "Blocking all ports and wait for establishment of control DL.\n"); + LOGPFSML(fi, LOGL_ERROR, "Blocking all ports and wait for establishment of control DL.\n"); /* stop traffic to CONTROL_COMMON and CONTROL_PORT FSM */ stop_traffic(mgmt); /* block all ISDN user ports */ @@ -803,7 +803,7 @@ static void system_lesys4_control_dl_released_2(struct osmo_fsm_inst *fi, uint32 switch (event) { case V5X_LE_SYSTEM_E_CONTROL_DL_ESTABLISHED: - LOGP(DV5MGMT, LOGL_INFO, "Establishment of control DL success.\n"); + LOGPFSML(fi, LOGL_INFO, "Establishment of control DL success.\n"); /* stop timer TC2 */ stop_timer_tc2(mgmt); /* start traffic to CONTROL_COMMON and CONTROL_PORT FSM */ @@ -830,7 +830,7 @@ static void system_lesys4_control_dl_released_2(struct osmo_fsm_inst *fi, uint32 lapv5_dl_est_req(v5if->control.li, V5X_DLADDR_CTRL); break; case V5X_LE_SYSTEM_E_TIMEOUT_TC2: - LOGP(DV5MGMT, LOGL_ERROR, "Could not establish control DL, shutting down.\n"); + LOGPFSML(fi, LOGL_ERROR, "Could not establish control DL, shutting down.\n"); /* disable LAPV5 DLs */ disable_lapv5(mgmt); /* block all PSTN user ports */ @@ -899,7 +899,7 @@ static void system_lesys8_system_deactivated(struct osmo_fsm_inst *fi, uint32_t /* ignore */ break; case V5X_LE_SYSTEM_E_START: - LOGP(DV5MGMT, LOGL_INFO, "Perform system restart\n"); + LOGPFSML(fi, LOGL_INFO, "Perform system restart\n"); /* new state */ osmo_fsm_inst_state_chg(fi, V5X_LE_SYSTEM_S_LESYS0_SYSTEM_STARTUP, 0, 0); system_startup(mgmt); @@ -1041,7 +1041,7 @@ static void pstn_lepdl1_active_pstn(struct osmo_fsm_inst *fi, uint32_t event, vo switch (event) { case V5X_LE_PSTN_DL_E_PSTN_DL_ESTABLISHED: - LOGP(DV5MGMT, LOGL_INFO, "Establishment of PSTN DL success.\n"); + LOGPFSML(fi, LOGL_INFO, "Establishment of PSTN DL success.\n"); /* new state */ osmo_fsm_inst_state_chg(fi, V5X_LE_PSTN_DL_S_LEPDL2_PSTN_IN_SERVICE, 0, 0); if (mgmt->do_align) { @@ -1054,7 +1054,7 @@ static void pstn_lepdl1_active_pstn(struct osmo_fsm_inst *fi, uint32_t event, vo } break; case V5X_LE_PSTN_DL_E_PSTN_DL_RELEASED: - LOGP(DV5MGMT, LOGL_ERROR, "Establishment of PSTN DL failed.\n"); + LOGPFSML(fi, LOGL_ERROR, "Establishment of PSTN DL failed.\n"); /* re-establish DL */ if (mgmt->do_est) lapv5_dl_est_req(v5if->pstn.li, V5X_DLADDR_PSTN); @@ -1074,7 +1074,7 @@ static void pstn_lepdl2_pstn_in_service(struct osmo_fsm_inst *fi, uint32_t event /* ignore */ break; case V5X_LE_PSTN_DL_E_PSTN_DL_RELEASED: - LOGP(DV5MGMT, LOGL_ERROR, "Establishment of PSTN DL failed.\n"); + LOGPFSML(fi, LOGL_ERROR, "Establishment of PSTN DL failed.\n"); /* start timer TC3 */ start_timer_tc3(mgmt); /* new state */ @@ -1095,7 +1095,7 @@ static void pstn_lepdl3_pstn_dl_released_1(struct osmo_fsm_inst *fi, uint32_t ev switch (event) { case V5X_LE_PSTN_DL_E_PSTN_DL_ESTABLISHED: - LOGP(DV5MGMT, LOGL_INFO, "Establishment of PSTN DL success.\n"); + LOGPFSML(fi, LOGL_INFO, "Establishment of PSTN DL success.\n"); /* stop timer TC3 */ stop_timer_tc3(mgmt); /* new state */ @@ -1124,7 +1124,7 @@ static void pstn_lepdl4_pstn_dl_released_2(struct osmo_fsm_inst *fi, uint32_t ev switch (event) { case V5X_LE_PSTN_DL_E_PSTN_DL_ESTABLISHED: - LOGP(DV5MGMT, LOGL_INFO, "Establishment of PSTN DL success.\n"); + LOGPFSML(fi, LOGL_INFO, "Establishment of PSTN DL success.\n"); /* new state */ osmo_fsm_inst_state_chg(fi, V5X_LE_PSTN_DL_S_LEPDL2_PSTN_IN_SERVICE, 0, 0); /* start PSTN restart process */ @@ -1225,12 +1225,12 @@ static void pstn_leprs0_restart_null(struct osmo_fsm_inst *fi, uint32_t event, v switch (event) { case V5X_LE_PSTN_RS_E_Request_PSTN_Restart: - LOGP(DV5MGMT, LOGL_INFO, "PSTN Restart was requested locally.\n"); + LOGPFSML(fi, LOGL_INFO, "PSTN Restart was requested locally.\n"); /* send restart request to COMMON_CONTROL */ v5x_le_ctrl_common_snd(v5if, V5X_CTRL_ID_RESTART_REQUEST, NULL, NULL, NULL); /* fall through */ case V5X_LE_PSTN_RS_E_MDU_CTRL_restart_request: - LOGP(DV5MGMT, LOGL_INFO, "PSTN Restart was requested by remote.\n"); + LOGPFSML(fi, LOGL_INFO, "PSTN Restart was requested by remote.\n"); /* new state */ osmo_fsm_inst_state_chg(fi, V5X_LE_PSTN_RS_S_LEPRS1_RESTART, 0, 0); /* start TR1 & TR2 */ @@ -1295,7 +1295,7 @@ static void pstn_leprs1_restart(struct osmo_fsm_inst *fi, uint32_t event, void _ } break; case V5X_LE_PSTN_RS_E_TIMEOUT_TR1: - LOGP(DV5MGMT, LOGL_ERROR, "Local PSTN Restart timed out.\n"); + LOGPFSML(fi, LOGL_ERROR, "Local PSTN Restart timed out.\n"); /* if restart of local PSTN ports is complete (always) */ if (1) { /* stop timer TR2 */ @@ -1309,7 +1309,7 @@ static void pstn_leprs1_restart(struct osmo_fsm_inst *fi, uint32_t event, void _ unblock_all_ports(v5if, false, false, true); break; case V5X_LE_PSTN_RS_E_TIMEOUT_TR2: - LOGP(DV5MGMT, LOGL_ERROR, "Remote PSTN Restart timed out.\n"); + LOGPFSML(fi, LOGL_ERROR, "Remote PSTN Restart timed out.\n"); /* new state */ osmo_fsm_inst_state_chg(fi, V5X_LE_PSTN_RS_S_LEPRS0_RESTART_NULL, 0, 0); /* send restart complete to COMMON_CONTROL */ @@ -1324,11 +1324,11 @@ static void pstn_leprs1_restart(struct osmo_fsm_inst *fi, uint32_t event, void _ } break; case V5X_LE_PSTN_RS_E_Request_PSTN_Restart: - LOGP(DV5MGMT, LOGL_INFO, "PSTN Restart was requested locally.\n"); + LOGPFSML(fi, LOGL_INFO, "PSTN Restart was requested locally.\n"); /* ignore */ break; case V5X_LE_PSTN_RS_E_MDU_CTRL_restart_request: - LOGP(DV5MGMT, LOGL_INFO, "PSTN Restart was requested by remote.\n"); + LOGPFSML(fi, LOGL_INFO, "PSTN Restart was requested by remote.\n"); /* ignore */ break; default: @@ -1447,13 +1447,13 @@ static void unblk_all_null(struct osmo_fsm_inst *fi, uint32_t event, void *data) switch (event) { case V5X_LE_UNBLK_ALL_E_REQUEST: if (!mgmt->acc_align) { - LOGP(DV5MGMT, LOGL_INFO, "Rejecting multiple port (un)blocking, It is not enabled!\n"); + LOGPFSML(fi, LOGL_INFO, "Rejecting multiple port (un)blocking, It is not enabled!\n"); v5x_le_ctrl_common_snd(v5if, V5X_CTRL_ID_UNBLK_ALL_REL_PSTN_ISDN_REJECTED + ins*4, NULL, NULL, NULL); break; } /* sending accepted */ - LOGP(DV5MGMT, LOGL_INFO, "Accepting multiple port (un)blocking, sending 'ACCEPTED' and perform it.\n"); + LOGPFSML(fi, LOGL_INFO, "Accepting multiple port (un)blocking, sending 'ACCEPTED' and perform it.\n"); v5x_le_ctrl_common_snd(v5if, V5X_CTRL_ID_UNBLK_ALL_REL_PSTN_ISDN_ACCEPTED + ins*4, NULL, NULL, NULL); /* start timer 2 and change state */ @@ -1461,7 +1461,7 @@ static void unblk_all_null(struct osmo_fsm_inst *fi, uint32_t event, void *data) /* silently align user ports */ do_accelerated_alignment(v5if, ins); /* sending completed */ - LOGP(DV5MGMT, LOGL_INFO, "Completed multiple port (un)blocking, sending 'COMPLETED'.\n"); + LOGPFSML(fi, LOGL_INFO, "Completed multiple port (un)blocking, sending 'COMPLETED'.\n"); v5x_le_ctrl_common_snd(v5if, V5X_CTRL_ID_UNBLK_ALL_REL_PSTN_ISDN_COMPLETED + ins*4, NULL, NULL, NULL); break; @@ -1469,7 +1469,7 @@ static void unblk_all_null(struct osmo_fsm_inst *fi, uint32_t event, void *data) /* start timer 1 and change state */ osmo_fsm_inst_state_chg(fi, V5X_LE_UNBLK_ALL_S_REQUESTED, TIMEOUT_TU1, 1); /* sending request */ - LOGP(DV5MGMT, LOGL_INFO, "Requesting multiple port (un)blocking, sending 'REQUEST'.\n"); + LOGPFSML(fi, LOGL_INFO, "Requesting multiple port (un)blocking, sending 'REQUEST'.\n"); v5x_le_ctrl_common_snd(v5if, V5X_CTRL_ID_UNBLK_ALL_REL_PSTN_ISDN_REQUEST + ins*4, NULL, NULL, NULL); break; @@ -1488,28 +1488,28 @@ static void unblk_all_requested(struct osmo_fsm_inst *fi, uint32_t event, void * switch (event) { case V5X_LE_UNBLK_ALL_E_REQUEST: /* sending accepted */ - LOGP(DV5MGMT, LOGL_INFO, "Collision of multiple port (un)blocking, sending 'ACCEPTED'.\n"); + LOGPFSML(fi, LOGL_INFO, "Collision of multiple port (un)blocking, sending 'ACCEPTED'.\n"); v5x_le_ctrl_common_snd(v5if, V5X_CTRL_ID_UNBLK_ALL_REL_PSTN_ISDN_ACCEPTED + ins*4, NULL, NULL, NULL); break; case V5X_LE_UNBLK_ALL_E_ACCEPTED: - LOGP(DV5MGMT, LOGL_INFO, "Remote accepted multiple port (un)blocking, perform it.\n"); + LOGPFSML(fi, LOGL_INFO, "Remote accepted multiple port (un)blocking, perform it.\n"); /* start timer 2 and change state */ osmo_fsm_inst_state_chg(fi, V5X_LE_UNBLK_ALL_S_COMPLETED, TIMEOUT_TU2, 2); /* silently align user ports */ do_accelerated_alignment(v5if, ins); /* sending completed */ - LOGP(DV5MGMT, LOGL_INFO, "Completed multiple port (un)blocking, sending 'COMPLETED'.\n"); + LOGPFSML(fi, LOGL_INFO, "Completed multiple port (un)blocking, sending 'COMPLETED'.\n"); v5x_le_ctrl_common_snd(v5if, V5X_CTRL_ID_UNBLK_ALL_REL_PSTN_ISDN_COMPLETED + ins*4, NULL, NULL, NULL); break; case V5X_LE_UNBLK_ALL_E_REJECTED: - LOGP(DV5MGMT, LOGL_ERROR, "Multiple port (un)blocking was rejected, aborting.\n"); + LOGPFSML(fi, LOGL_ERROR, "Multiple port (un)blocking was rejected, aborting.\n"); /* strop timer 1 and change state */ osmo_fsm_inst_state_chg(fi, V5X_LE_UNBLK_ALL_S_NULL, 0, 0); break; case V5X_LE_UNBLK_ALL_E_TIMEOUT_TU1: - LOGP(DV5MGMT, LOGL_ERROR, "Multiple port (un)blocking timed out, aborting.\n"); + LOGPFSML(fi, LOGL_ERROR, "Multiple port (un)blocking timed out, aborting.\n"); /* change state */ osmo_fsm_inst_state_chg(fi, V5X_LE_UNBLK_ALL_S_NULL, 0, 0); break; @@ -1527,14 +1527,14 @@ static void unblk_all_completed(struct osmo_fsm_inst *fi, uint32_t event, void * switch (event) { case V5X_LE_UNBLK_ALL_E_COMPLETED: - LOGP(DV5MGMT, LOGL_INFO, "Multiple port (un)blocking completed by remote.\n"); + LOGPFSML(fi, LOGL_INFO, "Multiple port (un)blocking completed by remote.\n"); /* stop timer 2 and change state */ osmo_fsm_inst_state_chg(fi, V5X_LE_UNBLK_ALL_S_NULL, 0, 0); /* send MPH-UBR/BI to align individual ports */ complete_accelerated_alignment(v5if, ins); break; case V5X_LE_UNBLK_ALL_E_TIMEOUT_TU2: - LOGP(DV5MGMT, LOGL_NOTICE, "Multiple port (un)blocking completed due to timeout.\n"); + LOGPFSML(fi, LOGL_NOTICE, "Multiple port (un)blocking completed due to timeout.\n"); /* change state */ osmo_fsm_inst_state_chg(fi, V5X_LE_UNBLK_ALL_S_NULL, 0, 0); /* send MPH-UBR/BI to align individual ports */ diff --git a/src/v5x_le_port_fsm.c b/src/v5x_le_port_fsm.c index 7e61fcc..7696f1e 100644 --- a/src/v5x_le_port_fsm.c +++ b/src/v5x_le_port_fsm.c @@ -565,13 +565,13 @@ bool v5x_le_port_isdn_is_operational(struct osmo_fsm_inst *fi) void v5x_le_port_isdn_block(struct osmo_fsm_inst *fi) { - LOGP(DV5PORT, LOGL_DEBUG, "Put ISDN port into blocked state\n"); + LOGPFSML(fi, LOGL_DEBUG, "Put ISDN port into blocked state\n"); fi->state = V5X_LE_UP_I_S_LE10_NOP_BLOCKED; } void v5x_le_port_isdn_unblock(struct osmo_fsm_inst *fi) { - LOGP(DV5PORT, LOGL_DEBUG, "Put ISDN port into unblocked state\n"); + LOGPFSML(fi, LOGL_DEBUG, "Put ISDN port into unblocked state\n"); fi->state = V5X_LE_UP_I_S_LE20_OP_OPERATIONAL_DEACTIVTED; } @@ -794,13 +794,13 @@ bool v5x_le_port_pstn_is_operational(struct osmo_fsm_inst *fi) void v5x_le_port_pstn_block(struct osmo_fsm_inst *fi) { - LOGP(DV5PORT, LOGL_DEBUG, "Put PSTN port into blocked state\n"); + LOGPFSML(fi, LOGL_DEBUG, "Put PSTN port into blocked state\n"); fi->state = V5X_LE_UP_P_S_LE10_NOP_BLOCKED; } void v5x_le_port_pstn_unblock(struct osmo_fsm_inst *fi) { - LOGP(DV5PORT, LOGL_DEBUG, "Put PSTN port into unblocked state\n"); + LOGPFSML(fi, LOGL_DEBUG, "Put PSTN port into unblocked state\n"); fi->state = V5X_LE_UP_P_S_LE20_OPERATIONAL; } @@ -830,7 +830,7 @@ void v5x_le_port_pstn_fe_rcv(struct v5x_user_port *v5up, uint8_t cfe) event = V5X_CUP_LE_FE205_BLOCK_REQ; break; default: - LOGP(DV5PORT, LOGL_NOTICE, "Received cfe %d not valid at this protocol\n", cfe); + LOGPFSML(fi, LOGL_NOTICE, "Received cfe %d not valid at this protocol\n", cfe); } /* send event to FSM */ diff --git a/src/v5x_le_pstn_fsm.c b/src/v5x_le_pstn_fsm.c index df59aba..f7965f1 100644 --- a/src/v5x_le_pstn_fsm.c +++ b/src/v5x_le_pstn_fsm.c @@ -382,7 +382,7 @@ void v5x_le_pstn_fe_snd(struct v5x_user_port *v5up, enum v5x_fe_prim prim, struc event = V5x_PSTN_LE_FE_disconnect_compl_req; break; default: - LOGP(DV5PSTN, LOGL_NOTICE, "Got invalid prim %d at this protocol\n", prim); + LOGPFSML(v5up->port_fi, LOGL_NOTICE, "Got invalid prim %d at this protocol\n", prim); return; } @@ -412,7 +412,7 @@ void v5x_le_pstn_mdu_snd(struct v5x_user_port *v5up, enum v5x_mgmt_prim prim) event = V5x_PSTN_LE_MDU_CTRL_restart_compl_req; break; default: - LOGP(DV5PSTN, LOGL_NOTICE, "Got invalid prim %d at this protocol\n", prim); + LOGPFSML(v5up->port_fi, LOGL_NOTICE, "Got invalid prim %d at this protocol\n", prim); return; } @@ -437,20 +437,20 @@ static void dl_send(struct osmo_fsm_inst *fi, struct msgb *msg) static void start_timer_Tr(struct v5x_pstn_proto *pstn) { - LOGP(DV5PSTN, LOGL_DEBUG, "Start timer Tr\n"); + LOGPFSML(pstn->fi, LOGL_DEBUG, "Start timer Tr\n"); osmo_timer_schedule(&pstn->timer_Tr, TIMEOUT_Tr, 0); } static void start_timer_Tt(struct v5x_pstn_proto *pstn) { - LOGP(DV5PSTN, LOGL_DEBUG, "Start timer Tt\n"); + LOGPFSML(pstn->fi, LOGL_DEBUG, "Start timer Tt\n"); osmo_timer_schedule(&pstn->timer_Tt, TIMEOUT_Tt, 0); } static void stop_timer_Tr(struct v5x_pstn_proto *pstn) { if (osmo_timer_pending(&pstn->timer_Tr)) { - LOGP(DV5PSTN, LOGL_DEBUG, "Stop timer Tr\n"); + LOGPFSML(pstn->fi, LOGL_DEBUG, "Stop timer Tr\n"); osmo_timer_del(&pstn->timer_Tr); } } @@ -458,7 +458,7 @@ static void stop_timer_Tr(struct v5x_pstn_proto *pstn) static void stop_timer_Tt(struct v5x_pstn_proto *pstn) { if (osmo_timer_pending(&pstn->timer_Tt)) { - LOGP(DV5PSTN, LOGL_DEBUG, "Stop timer Tt\n"); + LOGPFSML(pstn->fi, LOGL_DEBUG, "Stop timer Tt\n"); osmo_timer_del(&pstn->timer_Tt); } } @@ -467,7 +467,7 @@ static void stop_timer(struct osmo_fsm_inst *fi) { struct v5x_pstn_proto *pstn = fi->priv; - LOGP(DV5PSTN, LOGL_DEBUG, "Stop all timers\n"); + LOGPFSML(fi, LOGL_DEBUG, "Stop all timers\n"); osmo_timer_del(&fi->timer); stop_timer_Tr(pstn); stop_timer_Tt(pstn); @@ -499,7 +499,7 @@ static void start_timer(struct osmo_fsm_inst *fi, enum v5x_le_pstn_fsm_event eve OSMO_ASSERT(0); } - LOGP(DV5PSTN, LOGL_DEBUG, "Start timer %s (count = %d)\n", timer_name, count); + LOGPFSML(fi, LOGL_DEBUG, "Start timer %s (count = %d)\n", timer_name, count); pstn->timeout_event = event; pstn->timeout_count = count; osmo_timer_schedule(&fi->timer, timeout, 0); @@ -532,7 +532,7 @@ static void do_status_enquiry(struct osmo_fsm_inst *fi) { struct v5x_pstn_proto *pstn = fi->priv; - LOGP(DV5PSTN, LOGL_NOTICE, "Received message not allowed in current state, sending status enquiry.\n"); + LOGPFSML(fi, LOGL_NOTICE, "Received message not allowed in current state, sending status enquiry.\n"); /* start T4 */ start_timer(fi, V5x_PSTN_LE_TIMEOUT_T4, 1); @@ -1036,8 +1036,8 @@ static void pstn_le4_path_active(struct osmo_fsm_inst *fi, uint32_t event, void /* get sequence number and check if msg is in sequence */ seq_nr = *TLVP_VAL(tp, V5X_CTRL_IEI_SEQUENCE_NR) & 0x7f; if (pstn->S_r == seq_nr) { - LOGP(DV5PSTN, LOGL_DEBUG, "Received expected 'receive' sequence number: S(R)=%d == M(R)=%d\n", - pstn->S_r, seq_nr); + LOGPFSML(fi, LOGL_DEBUG, "Received expected 'receive' sequence number: S(R)=%d == M(R)=%d\n", + pstn->S_r, seq_nr); /* start Tr, if not pending */ if (!osmo_timer_pending(&pstn->timer_Tr)) start_timer_Tr(pstn); @@ -1046,8 +1046,8 @@ static void pstn_le4_path_active(struct osmo_fsm_inst *fi, uint32_t event, void /* send FE-signal_indication */ rcv_fe(fi, FE_line_signal_ind, tp); } else { - LOGP(DV5PSTN, LOGL_ERROR, "Invalid 'receive' sequence number: S(R)=%d != M(R)=%d\n", - pstn->S_r, seq_nr); + LOGPFSML(fi, LOGL_ERROR, "Invalid 'receive' sequence number: S(R)=%d != M(R)=%d\n", + pstn->S_r, seq_nr); /* send FE-signal_indication */ rcv_fe(fi, FE_line_signal_ind, tp); /* do several thing here */ @@ -1059,23 +1059,23 @@ static void pstn_le4_path_active(struct osmo_fsm_inst *fi, uint32_t event, void unacked = (pstn->S_s - pstn->S_a) & 127; acked = (pstn->S_s - seq_nr) & 127; if (acked <= unacked) { - LOGP(DV5PSTN, LOGL_DEBUG, "Received expected 'transmit' sequence number: M(R)=%d is inside " - "S(A)=%d...S(S)=%d range\n", seq_nr, pstn->S_a, pstn->S_s); - LOGP(DV5PSTN, LOGL_DEBUG, "We had %d unacked messages, now we have %d acked messages.\n", unacked, acked); + LOGPFSML(fi, LOGL_DEBUG, "Received expected 'transmit' sequence number: M(R)=%d is inside " + "S(A)=%d...S(S)=%d range\n", seq_nr, pstn->S_a, pstn->S_s); + LOGPFSML(fi, LOGL_DEBUG, "We had %d unacked messages, now we have %d acked messages.\n", unacked, acked); /* update acknowledge sequence number */ pstn->S_a = seq_nr; if (pstn->S_a == pstn->S_s) { - LOGP(DV5PSTN, LOGL_DEBUG, "No more outstanding message, so we don't need Tt anymore.\n"); + LOGPFSML(fi, LOGL_DEBUG, "No more outstanding message, so we don't need Tt anymore.\n"); /* stop Tt */ stop_timer_Tt(pstn); } else { - LOGP(DV5PSTN, LOGL_DEBUG, "There are still outstanding message, we still need Tt.\n"); + LOGPFSML(fi, LOGL_DEBUG, "There are still outstanding message, we still need Tt.\n"); /* start Tt */ start_timer_Tt(pstn); } } else { - LOGP(DV5PSTN, LOGL_ERROR, "Invalid 'transmit' sequence number: M(R)=%d not inside " - "S(A)=%d...S(S)=%d range\n", seq_nr, pstn->S_a, pstn->S_s); + LOGPFSML(fi, LOGL_ERROR, "Invalid 'transmit' sequence number: M(R)=%d not inside " + "S(A)=%d...S(S)=%d range\n", seq_nr, pstn->S_a, pstn->S_s); /* do several thing here */ do_disconnect_with_error(fi); } @@ -1180,13 +1180,13 @@ static void pstn_le4_path_active(struct osmo_fsm_inst *fi, uint32_t event, void break; case V5x_PSTN_LE_TIMEOUT_Tr: /* send SIGNAL ACK */ - LOGP(DV5PSTN, LOGL_DEBUG, "Sending recent 'receive' sequence number: S(R)=%d as acknowledge.\n", - pstn->S_r); + LOGPFSML(fi, LOGL_DEBUG, "Sending recent 'receive' sequence number: S(R)=%d as acknowledge.\n", + pstn->S_r); dl_send(fi, v5x_enc_signal_ack(pstn->v5up, pstn->S_r)); break; case V5x_PSTN_LE_TIMEOUT_Tt: /* do several thing here */ - LOGP(DV5PSTN, LOGL_ERROR, "Aborting, because of missing acknowledge of outstanding 'transmit' sequence number: S(A)=%d...S(S)=%d\n", pstn->S_a, pstn->S_s); + LOGPFSML(fi, LOGL_ERROR, "Aborting, because of missing acknowledge of outstanding 'transmit' sequence number: S(A)=%d...S(S)=%d\n", pstn->S_a, pstn->S_s); do_disconnect_with_error(fi); break; default: @@ -1592,7 +1592,7 @@ int v5x_le_pstn_dl_rcv(struct v5x_user_port *v5up, uint8_t msg_type, const struc event = V5x_PSTN_LE_STATUS; break; default: - LOGP(DV5PSTN, LOGL_NOTICE, "Invalid PSTN protocol message %d receied from AN.\n", msg_type); + LOGPFSML(v5up->port_fi, LOGL_NOTICE, "Invalid PSTN protocol message %d receied from AN.\n", msg_type); return -EINVAL; }