Change in libosmocore[master]: api comment: fix example of osmo_mobile_identity_encode_msgb

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 gerrit-no-reply at lists.osmocom.org
Fri Jun 26 14:19:43 UTC 2020


neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18964 )

Change subject: api comment: fix example of osmo_mobile_identity_encode_msgb
......................................................................

api comment: fix example of osmo_mobile_identity_encode_msgb

The previous example showed a type == IMSI while setting a TMSI value.
Rather show how to encode IMSI digits.

Change-Id: I41af6bf0d61443465172123297b1228584d791d6
---
M src/gsm/gsm48.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved



diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index 4368ce2..eb1d055 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -751,7 +751,8 @@
 /*! Encode Mobile Identity type and BCD digits, appended to a msgb.
  * Example to add a GSM48_IE_MOBILE_ID IEI with tag and length to a msgb:
  *
- *  struct osmo_mobile_identity mi = { .type = GSM_MI_TYPE_IMSI, .tmsi = random_tmsi, };
+ *  struct osmo_mobile_identity mi = { .type = GSM_MI_TYPE_IMSI };
+ *  OSMO_STRLCPY_ARRAY(mi.imsi, "1234567890123456");
  *  uint8_t *l = msgb_tl_put(msg, GSM48_IE_MOBILE_ID);
  *  int rc = osmo_mobile_identity_encode_msgb(msg, &mi, false);
  *  if (rc < 0)

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I41af6bf0d61443465172123297b1228584d791d6
Gerrit-Change-Number: 18964
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200626/47616ab3/attachment.htm>


More information about the gerrit-log mailing list