pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/38893?usp=email )
Change subject: stream_cli: Announce failed connect() if reconnect is disabled
......................................................................
stream_cli: Announce failed connect() if reconnect is disabled
One of the use cases of disabling reconnect in osmo_stream_cli is
because the user of the stream wants to control the reconnect based on
upper layer contexts. In this case, though, if there's a failure during
connect() time, the user won't get any notification and hence stay
disconnected forever. Instead, inform the user through the
disconnect_cb().
Change-Id: I69a5f7c3c7cea97d31e2fa03e8c32ce806285eb6
---
M src/stream_cli.c
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
diff --git a/src/stream_cli.c b/src/stream_cli.c
index 25dda4f..807f062 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -207,7 +207,10 @@
cli->state = STREAM_CLI_STATE_CLOSED;
- if (old_state == STREAM_CLI_STATE_CONNECTED) {
+ /* If conn was established, notify the disconnection to the user:
+ * Also, if reconnect is disabled by user, notify the user that connect() failed: */
+ if (old_state == STREAM_CLI_STATE_CONNECTED ||
+ (old_state == STREAM_CLI_STATE_CONNECTING && cli->reconnect_timeout < 0)) {
LOGSCLI(cli, LOGL_DEBUG, "connection closed\n");
if (cli->disconnect_cb)
cli->disconnect_cb(cli);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/38893?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I69a5f7c3c7cea97d31e2fa03e8c32ce806285eb6
Gerrit-Change-Number: 38893
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, jolly, laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/38886?usp=email )
Change subject: osmo_io: Increase default queue max_length from 32 to 1024
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> I think there should be some handling of that issue, no matter if we select a queue length of 32 or […]
iofd_txqueue_enqueue() returns -ENOSPC.
I'd actually maybe prefer simply having a default max_length=UNSIGNED_INT_MAX which would mean "infinite" (aka no checks, accept ay number).
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38886?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I92d5369af523f6297d45d4b534bb0f349ae74485
Gerrit-Change-Number: 38886
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 22 Nov 2024 16:12:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly <andreas(a)eversberg.eu>
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-netif/+/38892?usp=email )
Change subject: stream_cli: Log all code paths ending up in close/reconnect
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/38892?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I6debc5de193d99919fe858befd905223ef965d81
Gerrit-Change-Number: 38892
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 22 Nov 2024 16:08:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes