diff options
author | Harald Welte <laforge@osmocom.org> | 2020-11-30 10:55:22 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-12-01 11:56:57 +0000 |
commit | d97ff681c3c464e8c4da83cb5ecdeee4a721e1a9 (patch) | |
tree | 003b6a065b46453e90bd369ecf850593b8bf65c9 | |
parent | 83142beca2bc1e4ee985d9e343fd92c1a2c142c3 (diff) |
gb_proxy: More precise + readable log messages
* use string representations instead of magic numbers whenever possible
* make text actually describe the specific case, rather than copy+paste
* proper order (foobar indication) not (indication ..... foobar)
Change-Id: I232038da26a9963763c5fc9051b87c9182b27d94
-rw-r--r-- | src/gbproxy/gb_proxy.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c index bd58617ed..997085bbe 100644 --- a/src/gbproxy/gb_proxy.c +++ b/src/gbproxy/gb_proxy.c @@ -1545,10 +1545,8 @@ void gprs_ns_prim_status_cb(struct gbproxy_config *cfg, struct osmo_gprs_ns2_pri LOGP(DPCU, LOGL_NOTICE, "NS-NSE %d became unavailable\n", nsp->nsei); break; default: - LOGP(DPCU, LOGL_NOTICE, - "NS: %s Unknown prim %d from NS\n", - get_value_string(osmo_prim_op_names, nsp->oph.operation), - nsp->oph.primitive); + LOGP(DPCU, LOGL_NOTICE, "NS: Unknown NS-STATUS.ind cause=%s from NS\n", + gprs_ns2_aff_cause_prim_str(nsp->u.status.cause)); break; } } @@ -1567,9 +1565,8 @@ int gprs_ns2_prim_cb(struct osmo_prim_hdr *oph, void *ctx) nsp = container_of(oph, struct osmo_gprs_ns2_prim, oph); if (oph->operation != PRIM_OP_INDICATION) { - LOGP(DPCU, LOGL_NOTICE, "NS: %s Unknown prim %d from NS\n", - get_value_string(osmo_prim_op_names, oph->operation), - oph->operation); + LOGP(DPCU, LOGL_NOTICE, "NS: Unexpected primitive operation %s from NS\n", + get_value_string(osmo_prim_op_names, oph->operation)); return 0; } @@ -1587,10 +1584,9 @@ int gprs_ns2_prim_cb(struct osmo_prim_hdr *oph, void *ctx) gprs_ns_prim_status_cb(cfg, nsp); break; default: - LOGP(DPCU, LOGL_NOTICE, - "NS: %s Unknown prim %d from NS\n", - get_value_string(osmo_prim_op_names, oph->operation), - oph->primitive); + LOGP(DPCU, LOGL_NOTICE, "NS: Unknown prim %s %s from NS\n", + gprs_ns2_prim_str(oph->primitive), + get_value_string(osmo_prim_op_names, oph->operation)); break; } |