Attention is currently required from: lynxis lazus, pespin.

lynxis lazus uploaded patch set #2 to this change.

View Change

The following approvals got outdated and were removed: Code-Review-1 by pespin, Verified+1 by Jenkins Builder

rspro_server: fix releasing timed out clients

Fix crash on reconnects of clients if they timed out.

The duplicate check will use conn->peer of the old peer,
but conn->peer is NULL because rspro_client_conn_destroy() never destroys
the connection if conn->peer is valid when rspro_client_conn_destroy() is called.

void rspro_client_conn_destroy(conn)
{
if (conn->peer) {
peer = conn->peer;
conn->peer = NULL;
osmo_stream_srv_destroy(peer); /* calls sock_closed_cb()
}
[..]
}

int sock_closed_cb(peer)
{
[..]
if (conn->peer) {
osmo_fsm_inst_dispatch(conn->fi, CLNTC_E_TCP_DOWN, NULL); /* calls in the end rspro_client_conn_destroy() */
}
return 0;
}

Re-organize the clean up:
* rspro_client_conn_destroy() will be only called by the FSM clean up
* closed_cb will inform the fi to clean up

Fixes: 8cfe1d808a57 ("Use new osmo_ipa_ka_fsm_inst APIs from libosmo-netif")
Related: OS#6957
Change-Id: I1f7faf5ffdd909362c492ab434b63fa7e79ada95
---
M src/server/rspro_server.c
1 file changed, 11 insertions(+), 8 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/33/42133/2

To view, visit change 42133. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I1f7faf5ffdd909362c492ab434b63fa7e79ada95
Gerrit-Change-Number: 42133
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis@fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-Attention: pespin <pespin@sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis@fe80.eu>