pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/38976?usp=email )
Change subject: stream_cli: Assert reentrant disconnect_cb() never happens
......................................................................
stream_cli: Assert reentrant disconnect_cb() never happens
This should in fact already be guarded by early return in
stream_cli_close() setting and checking for CLOSED state, but it doesn't
hurt having this assert which also provides extra information to the
reader.
Change-Id: I9a12d76e27dce2b31a2aa993b70cbed30bdea7f2
---
M src/stream_cli.c
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
diff --git a/src/stream_cli.c b/src/stream_cli.c
index 2c1b00d..43877d3 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -203,6 +203,7 @@
* 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)) {
+ OSMO_ASSERT(!(cli->in_cb_mask & IN_CB_MASK_DISCONNECT_CB));
cli->in_cb_mask |= IN_CB_MASK_DISCONNECT_CB;
if (cli->disconnect_cb)
cli->disconnect_cb(cli);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/38976?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: I9a12d76e27dce2b31a2aa993b70cbed30bdea7f2
Gerrit-Change-Number: 38976
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: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/38979?usp=email )
Change subject: stream_cli: Explicitly ignore return code of stream_cli_close
......................................................................
stream_cli: Explicitly ignore return code of stream_cli_close
Make coverity happy.
We don't really case about th return code of the stream_cli_close()
function in the code path, since the return value is only used
internally/privately in the object and there's no further access/use of
the object after calling it in osmo_stream_cli_close().
Take the chance to update syntax of one return code check to match more
similarly other return checks of the same function.
Related: Coverity CID#435092
Change-Id: Ia6c9e3ca3af08b386f017460b0a0210ed756a929
---
M src/stream_cli.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
diff --git a/src/stream_cli.c b/src/stream_cli.c
index 43877d3..85ede60 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -219,7 +219,7 @@
* abstraction and close the socket */
void osmo_stream_cli_close(struct osmo_stream_cli *cli)
{
- stream_cli_close(cli);
+ (void)stream_cli_close(cli);
}
/*! Re-connect an Osmocom Stream Client.
@@ -967,7 +967,7 @@
return;
LOGSCLI(cli, LOGL_DEBUG, "destroy()\n");
- OSMO_ASSERT(!stream_cli_close(cli));
+ OSMO_ASSERT(stream_cli_close(cli) == false);
osmo_timer_del(&cli->timer);
msgb_queue_free(&cli->tx_queue);
cli->tx_queue_count = 0;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/38979?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: Ia6c9e3ca3af08b386f017460b0a0210ed756a929
Gerrit-Change-Number: 38979
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: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-cbc/+/38978?usp=email )
Change subject: abis: Fix reusing link->conn while it is being destroyed
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/38978?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I56605766af974d86610d0958f4b82e6e4ff94502
Gerrit-Change-Number: 38978
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 29 Nov 2024 08:52:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes