osmo-mgw[master]: protocol: allow wildcarded DLCX

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Oct 11 22:23:39 UTC 2017


Patch Set 1: Code-Review-1

(3 comments)

https://gerrit.osmocom.org/#/c/4227/1//COMMIT_MSG
Commit Message:

Line 14: id is supplied with the DLCX command.
is a missing call id compliant with MGCP?


https://gerrit.osmocom.org/#/c/4227/1/src/libosmo-mgcp/mgcp_protocol.c
File src/libosmo-mgcp/mgcp_protocol.c:

Line 911: 	if (mgcp_parse_ci(&conn_id, ci)) {
mgcp_parse_ci() returns non-null in only this case:

        if (!ci)
                return -1;

It fails to properly detect errors in the ci string, for !*ci and in case strtoull() returns errors. The way it is now, it leaves the conn_id unchanged if I pass in an empty or non-numeric string, which is certainly not what we want. 

If that is fixed though, this condition here should rather not be

       if (mgcp_parse_ci())

because a non-numeric conn id would trigger an error rc and then drop all active connections -_-

I think a keyword instead of empty would be a better approach?

So I think this should either be

     if (!ci || !*ci) {
         delete all conns
         return;
     }

     if (mgcp_parse_ci()) {
         error handling
     }

or

     if (!strcmp(ci, "ALL")) {
         delete all conns
         return;
     }

     if (mgcp_parse_ci()) {
         error handling
     }

and mgcp_parse_ci() should return errors properly.


Line 916: 		/* Appereantly no connection id had been supplied, this
'Apparently'
'has been'


-- 
To view, visit https://gerrit.osmocom.org/4227
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib5fcc72775bf72b489ff79ade36fb345d8d20736
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list