Change in osmo-mgw[master]: Fix OSMO_ASSERT() in case rtp.end.addr is still uninitialized

pespin gerrit-no-reply at lists.osmocom.org
Tue Apr 20 16:23:53 UTC 2021


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/23812 )

Change subject: Fix OSMO_ASSERT() in case rtp.end.addr is still uninitialized
......................................................................


Patch Set 1: Code-Review-2

(1 comment)

https://gerrit.osmocom.org/c/osmo-mgw/+/23812/1/src/libosmo-mgcp/mgcp_network.c 
File src/libosmo-mgcp/mgcp_network.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/23812/1/src/libosmo-mgcp/mgcp_network.c@1272 
PS1, Line 1272: 			OSMO_ASSERT(conn->u.rtp.end.addr.u.sa.sa_family == 0 ||
This OSMO_ASSERT can be dropped completely.
The condition above "if (conn->u.rtp.end.rtp_port == 0)" basically checks if the remote rtp endp is configured. As a result, inside this code path, this assert condition is always going to be false.

If at all, the assert condition should be "OSMO_ASSERT(conn->u.rtp.end.addr.u.sa.sa_family == AF_UNSPEC)".



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/23812
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I2ecf81447e6a92fb566baba53fcf819f4029d54d
Gerrit-Change-Number: 23812
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Assignee: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 20 Apr 2021 16:23:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210420/40c0075c/attachment.htm>


More information about the gerrit-log mailing list