Change in osmo-ttcn3-hacks[master]: library/MNCC_EncDec.cc: fix encoding of optional 'sdp' field

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

fixeria gerrit-no-reply at lists.osmocom.org
Thu Oct 28 11:43:14 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26005 )


Change subject: library/MNCC_EncDec.cc: fix encoding of optional 'sdp' field
......................................................................

library/MNCC_EncDec.cc: fix encoding of optional 'sdp' field

Decoding was implemented in [1], but encoding was not.

Change-Id: I82f8afd3e64d83d165a7070a1b82a6276ef0b020
Fixes: [1] Ic9568c8927507e161aadfad1a4d20aa896d8ae30
---
M library/MNCC_EncDec.cc
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/05/26005/1

diff --git a/library/MNCC_EncDec.cc b/library/MNCC_EncDec.cc
index 7d09d0a..f896cd3 100644
--- a/library/MNCC_EncDec.cc
+++ b/library/MNCC_EncDec.cc
@@ -184,6 +184,10 @@
 		strncpy(mncc.imsi, in_sig.imsi(), sizeof(mncc.imsi));
 		mncc.lchan_type = in_sig.lchan__type();
 		mncc.lchan_mode = in_sig.lchan__mode();
+		if (in_sig.sdp().is_value()) {
+			const CHARSTRING &sdp = in_sig.sdp();
+			strncpy(&mncc.sdp[0], sdp, sizeof(mncc.sdp));
+		}
 		ret_val = OCTETSTRING(sizeof(mncc), (uint8_t *)&mncc);
 		}
 		break;

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I82f8afd3e64d83d165a7070a1b82a6276ef0b020
Gerrit-Change-Number: 26005
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211028/25263162/attachment.htm>


More information about the gerrit-log mailing list