dexter has uploaded this change for review.
pcu_sock: fix PCU socket accept behavior
When a new PCU connection is accepted while the old connection is still
present, then the new connection should replace the old one. At the
moment we disable the active connection and close the one, which
leaves us with no connection at all.
Change-Id: I6ebc40e13d7dd4707c9f81fa8732ccedbfc862ec
---
M src/osmo-bsc/pcu_sock.c
1 file changed, 15 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/86/31686/1
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index 7160210..0a2879b 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -927,7 +927,7 @@
LOG_BTS(bts, DPCU, LOGL_NOTICE, "PCU connects but we already have another active connection ?!?\n");
/* We already have one PCU connected, this is all we support */
osmo_fd_read_disable(&state->listen_bfd);
- close(fd);
+ close(conn_bfd->fd);
return 0;
}
To view, visit change 31686. To unsubscribe, or for help writing mail filters, visit settings.