summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-10-23 18:09:04 +0200
committerlaforge <laforge@osmocom.org>2019-10-23 18:10:10 +0000
commit51efa023c9bf0e092c1db014f21d9e3cb3df4ffc (patch)
tree44436a4ffc3d77c13c2ca2eb73cebea77140857b
parent0e019528c9ac05f6adf7f17ed48cecb7a4a0ad94 (diff)
ss7: Fix osmo_ss7_asp_peer_snprintf() output if peer has zero IP addr assigned
If no IP addr is assigned yet, until know it'd print "(:3456". Let's print ":34456" in that scenario. Change-Id: Iae85d231093b6f3ce6b969324699858e525c14ea
-rw-r--r--src/osmo_ss7.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index e7e688d..5da0da8 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1074,7 +1074,7 @@ int osmo_ss7_asp_peer_snprintf(char* buf, size_t buf_len, struct osmo_ss7_asp_pe
if (buf_len < 3)
return -EINVAL;
- if (peer->host_cnt != 1) {
+ if (peer->host_cnt > 1) {
ret = snprintf(buf, rem, "(");
if (ret < 0)
return ret;