Change in libosmo-netif[master]: stream: Drop data during write() while in state NONE

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Tue Jan 28 21:41:54 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/17029 )

Change subject: stream: Drop data during write() while in state NONE
......................................................................

stream: Drop data during write() while in state NONE

It should not happen anyway because no fd should be active if state is
NONE, but still it's an extra check.

Change-Id: I6d58762b7d10078eb8d0981c13d35cb6f85cfe86
---
M src/stream.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved



diff --git a/src/stream.c b/src/stream.c
index fe3de2a..1a38e77 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -247,7 +247,7 @@
 	llist_del(lh);
 	msg = llist_entry(lh, struct msgb, list);
 
-	if (cli->state == STREAM_CLI_STATE_CONNECTING) {
+	if (!osmo_stream_cli_is_connected(cli)) {
 		LOGSCLI(cli, LOGL_ERROR, "not connected, dropping data!\n");
 		return 0;
 	}

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/17029
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I6d58762b7d10078eb8d0981c13d35cb6f85cfe86
Gerrit-Change-Number: 17029
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200128/a76f2d35/attachment.htm>


More information about the gerrit-log mailing list