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/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Jan 28 11:59:41 UTC 2020


pespin has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/29/17029/1

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-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200128/260ef7fd/attachment.htm>


More information about the gerrit-log mailing list