neels has uploaded this change for review.
fix umts_cell_id_name(): show CID
The Cell ID is an important part to distinguish HNB in logging, add it
to the output string.
Use OTC_SELECT buffer instead of static buffer.
Related: SYS#6412
Change-Id: Id903b8579ded8b908e644808e440d373bcca8da4
---
M src/osmo-hnbgw/hnbgw.c
1 file changed, 17 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/69/33169/1
diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c
index 1fd04e1..bc5cd9f 100644
--- a/src/osmo-hnbgw/hnbgw.c
+++ b/src/osmo-hnbgw/hnbgw.c
@@ -345,10 +345,8 @@
static const char *umts_cell_id_name(const struct umts_cell_id *ucid)
{
- static __thread char buf[40];
-
- snprintf(buf, sizeof(buf), "%u-%u-L%u-R%u-S%u", ucid->mcc, ucid->mnc, ucid->lac, ucid->rac, ucid->sac);
- return buf;
+ return talloc_asprintf(OTC_SELECT, "%u-%u-L%u-R%u-S%u-C%u", ucid->mcc, ucid->mnc, ucid->lac, ucid->rac,
+ ucid->sac, ucid->cid);
}
const char *hnb_context_name(struct hnb_context *ctx)
To view, visit change 33169. To unsubscribe, or for help writing mail filters, visit settings.