jolly has uploaded this change for review.
stream_cli: Do not try to send msg, if not connected
Related: OS#5753
Change-Id: I9e5f5db9b45615dacb05115c4de8ff3f715815c8
---
M src/stream_cli.c
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/23/36123/1
diff --git a/src/stream_cli.c b/src/stream_cli.c
index 3544e14..f9e52a0 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -995,6 +995,12 @@
OSMO_ASSERT(cli);
OSMO_ASSERT(msg);
+ if (cli->state != STREAM_CLI_STATE_CONNECTED) {
+ LOGSCLI(cli, LOGL_ERROR, "Not connected with srv.\n");
+ msgb_free(msg);
+ return;
+ }
+
switch (cli->mode) {
case OSMO_STREAM_MODE_OSMO_FD:
msgb_enqueue(&cli->tx_queue, msg);
To view, visit change 36123. To unsubscribe, or for help writing mail filters, visit settings.