ipaccess: Fix log error printed on wrong conditional branch
The signal link is set if fd is established (see osmo_fd_setup in
ipaccess.c).
This log message was introduced in 466c5467e2e95c04260cb6b933181a38d1d97bd5,
where the lifecycle worked a bit different than nowadays:
line->ops->sign_link_down() was called before the log line, so the code
expected by that time that the socket should have been freed by
sign_link_down(). That's no longer the case. In ipaccess_drop, we force
dropping so we release lower layers and then signal upper layers. Hence,
the log lines are misleading nowadays.
Change-Id: Ibc6554e6cacc9c71232238b4e6a17d749dfdd30a
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 593f9f0..48a427c 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -88,8 +88,7 @@
/* Error case: we did not see any ID_RESP yet for this socket. */
if (bfd->fd != -1) {
- LOGP(DLINP, LOGL_ERROR, "Forcing socket shutdown with "
- "no signal link set\n");
+ LOGPITS(e1i_ts, DLINP, LOGL_NOTICE, "Forcing socket shutdown\n");
osmo_fd_unregister(bfd);
close(bfd->fd);
bfd->fd = -1;
@@ -101,6 +100,9 @@
e1inp_line_put2(line, "ipa_bfd");
ret = -ENOENT;
+ } else {
+ LOGPITS(e1i_ts, DLINP, LOGL_ERROR,
+ "Forcing socket shutdown with no signal link set\n");
}
msgb_free(e1i_ts->pending_msg);