jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-netif/+/36123?usp=email )
Change subject: stream_cli: Do not try to send msg, if not connected
......................................................................
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
https://gerrit.osmocom.org/c/libosmo-netif/+/36123?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I9e5f5db9b45615dacb05115c4de8ff3f715815c8
Gerrit-Change-Number: 36123
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-MessageType: newchange