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 the one, which
leaves us with no connection at all.
Change-Id: I695b93fd8109ef4943f36716563c147927611e85
---
M src/common/pcu_sock.c
1 file changed, 15 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/78/31678/1
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 119d7b8..ae78939 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -1173,7 +1173,7 @@
LOGP(DPCU, LOGL_NOTICE, "PCU connects but we already have another active connection ?!?\n");
/* We already have one PCU connected, this is all we support */
state->listen_bfd.when &= ~OSMO_FD_READ;
- close(fd);
+ close(conn_bfd->fd);
return 0;
}
To view, visit change 31678. To unsubscribe, or for help writing mail filters, visit settings.