aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-06-22 17:48:01 +0200
committerneels <nhofmeyr@sysmocom.de>2020-06-24 11:31:56 +0000
commit4247c94abf533d743a0c5c8831862ff24e61ca15 (patch)
tree406df9c8e75385267dbf1fb81597cb9a2f4811d5 /src
parent1bd726a2e4eaf7f4bd721dec7602bbe754eed693 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/gsm/gsm48.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index 4368ce23..eb1d055b 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -751,7 +751,8 @@ int osmo_mobile_identity_encode_buf(uint8_t *buf, size_t buflen, const struct os
/*! 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)