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

Change subject: Add assert for link check to osmo_stream_srv_create()
......................................................................

Add assert for link check to osmo_stream_srv_create()

We implicitly rely on conn->srv availability in several functions.
Let's ensure it's available in function creating conn.

Change-Id: If494eac5dcce6c5ae30e928b92e57067d5681a42
---
M src/stream.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/stream.c b/src/stream.c
index 0086588..d3e9ad8 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -1377,6 +1377,8 @@
 {
        struct osmo_stream_srv *conn;

+       OSMO_ASSERT(link);
+
        conn = talloc_zero(ctx, struct osmo_stream_srv);
        if (conn == NULL) {
                LOGP(DLINP, LOGL_ERROR, "cannot allocate new peer in srv, "

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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: If494eac5dcce6c5ae30e928b92e57067d5681a42
Gerrit-Change-Number: 30226
Gerrit-PatchSet: 7
Gerrit-Owner: msuraev <msur...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to