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.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/15404 Change subject: stream: Fix scheduling of queued messages during connecting state ...................................................................... stream: Fix scheduling of queued messages during connecting state If messages are sent using osmo_stream_cli_send() while the stream is still (re)connecting, they won't have a chance to be sent until the stream is connected, and hence they are queued until CONNECTING->CONNECTED is done. However, at that time (osmo_stream_cli_fd_cb), the WRITE flag was dropped unconditionally, which meant already queued packets didn't have the opportunity to be sent by the same callback until first message is enqueued and WRITE flag is set (again by osmo_stream_cli_send()). Let's make them be sent as soon as possible once the connection is available. Change-Id: I289495f9aad6389c5f2623fb072d676235b7d24c --- M src/stream.c 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/04/15404/1 diff --git a/src/stream.c b/src/stream.c index 74fe8b6..e9307a5 100644 --- a/src/stream.c +++ b/src/stream.c @@ -283,7 +283,12 @@ osmo_stream_cli_reconnect(cli); return 0; } - ofd->when &= ~BSC_FD_WRITE; + + /* If messages got enqueued while 'connecting', keep WRITE flag + up to dispatch them upon next main loop step */ + if (llist_empty(&cli->tx_queue)) + cli->ofd.when &= ~BSC_FD_WRITE; + LOGSCLI(cli, LOGL_DEBUG, "connection done.\n"); cli->state = STREAM_CLI_STATE_CONNECTED; if (cli->proto == IPPROTO_SCTP) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/15404 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I289495f9aad6389c5f2623fb072d676235b7d24c Gerrit-Change-Number: 15404 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/20190904/93d3ebb6/attachment.htm>