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
Mon Jun 22 15:48:58 UTC 2020


neels has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/64/18964/1

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: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200622/0dac70df/attachment.htm>


More information about the gerrit-log mailing list