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 466c5467e2
,
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
This commit is contained in:
parent
3bdf59b227
commit
91314c10af
|
@ -88,8 +88,7 @@ static int ipaccess_drop(struct osmo_fd *bfd, struct e1inp_line *line)
|
|||
|
||||
/* 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 @@ static int ipaccess_drop(struct osmo_fd *bfd, struct e1inp_line *line)
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue