diff options
author | Max <msuraev@sysmocom.de> | 2017-10-23 15:09:23 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-10-24 14:33:30 +0000 |
commit | 4ce24c45b9286c3946135f97d6ca6f2d4074526e (patch) | |
tree | 5a5463df566fdc742cb19fc0f44c09edcf428648 /src/gb | |
parent | abdd7a28ede091f06325b3e5b8a77fc9130e6ee3 (diff) |
GPRS: unify NS state printing
* introduce defines with NS state names
* use them for vty and tests
* expand test output to print complete NS state
Change-Id: I69f8d536135ae76dbca623c2f1ffba625adcb1e9
Related: SYS#3610
Diffstat (limited to 'src/gb')
-rw-r--r-- | src/gb/gprs_ns_vty.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c index 3b1a6987..317a6a10 100644 --- a/src/gb/gprs_ns_vty.c +++ b/src/gb/gprs_ns_vty.c @@ -160,11 +160,11 @@ static void dump_nse(struct vty *vty, struct gprs_nsvc *nsvc, int stats) { vty_out(vty, "NSEI %5u, NS-VC %5u, %5s %9s, Remote: %-4s, %5s %9s", nsvc->nsei, nsvc->nsvci, - nsvc->state & NSE_S_ALIVE ? "ALIVE" : "DEAD", - nsvc->state & NSE_S_BLOCKED ? "BLOCKED" : "UNBLOCKED", + NS_DESC_A(nsvc->state), + NS_DESC_B(nsvc->state), nsvc->remote_end_is_sgsn ? "SGSN" : "BSS", - nsvc->remote_state & NSE_S_ALIVE ? "ALIVE" : "DEAD", - nsvc->remote_state & NSE_S_BLOCKED ? "BLOCKED" : "UNBLOCKED"); + NS_DESC_A(nsvc->remote_state), + NS_DESC_B(nsvc->remote_state)); if (nsvc->ll == GPRS_NS_LL_UDP || nsvc->ll == GPRS_NS_LL_FR_GRE) vty_out(vty, ", %s %15s:%u", nsvc->ll == GPRS_NS_LL_UDP ? "UDP " : "FR-GRE", |