osmith submitted this change.
src/rspro_client_fsm: fix osmo_stream_cli_destroy
Fix for:
Assert failed stream_cli_close(cli) == false ../../src_copy/libosmo-netif/src/stream_cli.c:1023
Reproducer in osmo-ttcn3-hacks:
./testenv.py run remsim -c client -t RemsimClient_Tests.TC_bank_disconnect
Suggested-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I0da0b4354532b4e13d0c4bf4b132ec774f24497f
---
M src/rspro_client_fsm.c
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/rspro_client_fsm.c b/src/rspro_client_fsm.c
index d847f3b..63bd534 100644
--- a/src/rspro_client_fsm.c
+++ b/src/rspro_client_fsm.c
@@ -534,8 +534,9 @@
case SRVC_E_DISCONNECT:
if (srvc->conn) {
LOGPFSML(fi, LOGL_INFO, "Destroying existing connection to server\n");
- osmo_stream_cli_destroy(srvc->conn);
+ struct osmo_stream_cli *conn = srvc->conn;
srvc->conn = NULL;
+ osmo_stream_cli_destroy(conn);
}
osmo_fsm_inst_state_chg(fi, SRVC_ST_INIT, 0, 0);
break;
To view, visit change 39920. To unsubscribe, or for help writing mail filters, visit settings.