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/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/9472 Change subject: protocol: do not change LCO, when no LCO are present ...................................................................... protocol: do not change LCO, when no LCO are present In the current implementation the LCO parameters are reset. This means that an MDCX without LCO will reset the LCO that have previously set via CRCX. But according to RFC 3435 6.8 LocalConnectionOptions, the LCO parameters should be preserved or left at their defaults if missing. - Make sure LCO are retained if no LCO string is present. - Also preserve the values of individual parameters if missing. Change-Id: Ia0d73f61516618317dcd1d49384818fd8de27aa6 --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/72/9472/1 diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index b403be0..ded1552 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -405,10 +405,12 @@ char *p_opt, *a_opt; char codec[9]; + if (!options) + return 0; + if (strlen(options) == 0) + return 0; + talloc_free(lco->string); - talloc_free(lco->codec); - lco->codec = NULL; - lco->pkt_period_min = lco->pkt_period_max = 0; lco->string = talloc_strdup(ctx, options ? options : ""); p_opt = strstr(lco->string, "p:"); @@ -417,8 +419,10 @@ lco->pkt_period_max = lco->pkt_period_min; a_opt = strstr(lco->string, "a:"); - if (a_opt && sscanf(a_opt, "a:%8[^,]", codec) == 1) + if (a_opt && sscanf(a_opt, "a:%8[^,]", codec) == 1) { + talloc_free(lco->codec); lco->codec = talloc_strdup(ctx, codec); + } LOGP(DLMGCP, LOGL_DEBUG, "local CX options: lco->pkt_period_max: %i, lco->codec: %s\n", -- To view, visit https://gerrit.osmocom.org/9472 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0d73f61516618317dcd1d49384818fd8de27aa6 Gerrit-Change-Number: 9472 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180606/daf9e02b/attachment.htm>