From e4ecc8c81e0333506e1ddee18ac82321d8950e81 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 12 May 2010 00:16:57 +0200 Subject: [gprs] NS: elevate events from LOGL_DEBUG to LOGL_INFO --- openbsc/src/gprs/gprs_ns.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'openbsc/src') diff --git a/openbsc/src/gprs/gprs_ns.c b/openbsc/src/gprs/gprs_ns.c index 745a0b57..fdefa653 100644 --- a/openbsc/src/gprs/gprs_ns.c +++ b/openbsc/src/gprs/gprs_ns.c @@ -272,10 +272,11 @@ static void gprs_ns_timer_cb(void *data) if (nsvc->alive_retries > NS_ALIVE_RETRIES) { /* mark as dead and blocked */ nsvc->state = NSE_S_BLOCKED; - DEBUGP(DNS, "NSEI=%u Tns-alive expired more then " + LOGP(DNS, LOGL_NOTICE, + "NSEI=%u Tns-alive expired more then " "%u times, blocking NS-VC\n", nsvc->nsei, NS_ALIVE_RETRIES); - /* FIXME: inform higher layers */ + ns_dispatch_signal(nsvc, S_NS_BLOCK, NS_CAUSE_NSVC_BLOCKED); return; } nsvc_start_timer(nsvc, NSVC_TIMER_TNS_ALIVE); @@ -313,7 +314,7 @@ static int gprs_ns_tx_reset_ack(struct gprs_nsvc *nsvc) nsh->pdu_type = NS_PDUT_RESET_ACK; - DEBUGP(DNS, "NSEI=%u Tx NS RESET ACK (NSVCI=%u)\n", + LOGP(DNS, LOGL_INFO, "NSEI=%u Tx NS RESET ACK (NSVCI=%u)\n", nsvc->nsei, nsvc->nsvci); msgb_tvlv_put(msg, NS_IE_VCI, 2, (uint8_t *)&nsvci); @@ -384,17 +385,17 @@ static int gprs_ns_rx_status(struct gprs_nsvc *nsvc, struct msgb *msg) uint8_t cause; int rc; - DEBUGP(DNS, "NSEI=%u NS STATUS ", nsvc->nsei); + LOGP(DNS, LOGL_INFO, "NSEI=%u NS STATUS ", nsvc->nsei); rc = tlv_parse(&tp, &ns_att_tlvdef, nsh->data, msgb_l2len(msg), 0, 0); if (!TLVP_PRESENT(&tp, NS_IE_CAUSE)) { - DEBUGPC(DNS, "missing cause IE\n"); + LOGPC(DNS, LOGL_INFO, "missing cause IE\n"); return -EINVAL; } cause = *TLVP_VAL(&tp, NS_IE_CAUSE); - DEBUGPC(DNS, "cause=%s\n", gprs_ns_cause_str(cause)); + LOGPC(DNS, LOGL_INFO, "cause=%s\n", gprs_ns_cause_str(cause)); return 0; } @@ -422,7 +423,7 @@ static int gprs_ns_rx_reset(struct gprs_nsvc *nsvc, struct msgb *msg) nsvci = (uint16_t *) TLVP_VAL(&tp, NS_IE_VCI); nsei = (uint16_t *) TLVP_VAL(&tp, NS_IE_NSEI); - DEBUGP(DNS, "NSEI=%u Rx NS RESET (NSVCI=%u, cause=%s)\n", + LOGP(DNS, LOGL_INFO, "NSEI=%u Rx NS RESET (NSVCI=%u, cause=%s)\n", nsvc->nsvci, nsvc->nsei, gprs_ns_cause_str(*cause)); nsvc->state = NSE_S_BLOCKED | NSE_S_ALIVE; @@ -451,7 +452,7 @@ static int gprs_ns_rx_block(struct gprs_nsvc *nsvc, struct msgb *msg) uint8_t *cause; int rc; - DEBUGP(DNS, "NSEI=%u Rx NS BLOCK\n", nsvc->nsei); + LOGP(DNS, LOGL_INFO, "NSEI=%u Rx NS BLOCK\n", nsvc->nsei); nsvc->state |= NSE_S_BLOCKED; @@ -545,7 +546,7 @@ int gprs_ns_rcvmsg(struct gprs_ns_inst *nsi, struct msgb *msg, rc = gprs_ns_rx_reset(nsvc, msg); break; case NS_PDUT_RESET_ACK: - DEBUGP(DNS, "NSEI=%u Rx NS RESET ACK\n", nsvc->nsei); + LOGP(DNS, LOGL_INFO, "NSEI=%u Rx NS RESET ACK\n", nsvc->nsei); /* mark remote NS-VC as blocked + active */ nsvc->remote_state = NSE_S_BLOCKED | NSE_S_ALIVE; if (nsvc->remote_end_is_sgsn) { @@ -560,13 +561,13 @@ int gprs_ns_rcvmsg(struct gprs_ns_inst *nsi, struct msgb *msg, break; case NS_PDUT_UNBLOCK: /* Section 7.2: unblocking procedure */ - DEBUGP(DNS, "NSEI=%u Rx NS UNBLOCK\n", nsvc->nsei); + LOGP(DNS, LOGL_INFO, "NSEI=%u Rx NS UNBLOCK\n", nsvc->nsei); nsvc->state &= ~NSE_S_BLOCKED; ns_dispatch_signal(nsvc, S_NS_UNBLOCK, 0); rc = gprs_ns_tx_simple(nsvc, NS_PDUT_UNBLOCK_ACK); break; case NS_PDUT_UNBLOCK_ACK: - DEBUGP(DNS, "NSEI=%u Rx NS UNBLOCK ACK\n", nsvc->nsei); + LOGP(DNS, LOGL_INFO, "NSEI=%u Rx NS UNBLOCK ACK\n", nsvc->nsei); /* mark remote NS-VC as unblocked + active */ nsvc->remote_state = NSE_S_ALIVE; if (nsvc->remote_end_is_sgsn) @@ -576,12 +577,12 @@ int gprs_ns_rcvmsg(struct gprs_ns_inst *nsi, struct msgb *msg, rc = gprs_ns_rx_block(nsvc, msg); break; case NS_PDUT_BLOCK_ACK: - DEBUGP(DNS, "NSEI=%u Rx NS BLOCK ACK\n", nsvc->nsei); + LOGP(DNS, LOGL_INFO, "NSEI=%u Rx NS BLOCK ACK\n", nsvc->nsei); /* mark remote NS-VC as blocked + active */ nsvc->remote_state = NSE_S_BLOCKED | NSE_S_ALIVE; break; default: - DEBUGP(DNS, "NSEI=%u Rx Unknown NS PDU type 0x%02x\n", + LOGP(DNS, LOGL_NOTICE, "NSEI=%u Rx Unknown NS PDU type 0x%02x\n", nsvc->nsei, nsh->pdu_type); rc = -EINVAL; break; -- cgit v1.2.3