On 27 Mar 2016, at 14:17, Vadim Yanitskiy axilirator@gmail.com wrote:
Dear Vadim,
In OpenBSC, we traditionally displayed a TMSI in its integer representation, which is quite unusual in the telecom world. A TMSI is normally printed as a series of 8 hex digits.
This patch aligns OpenBSC with the telecom industry standard.
thanks a lot, I am afraid we need one more round.
-#define tmsi_from_string(str) strtoul(str, NULL, 10) +#define tmsi_from_string(str) strtoul(str + 2, NULL, 16)
this macro is used for parsing strings from the network. We should not modify it.
struct gsm_subscriber *subscr_active_by_tmsi(struct gsm_subscriber_group *sgrp,
uint32_t tmsi)
const char *tmsi)
why? the number of bytes needed fit in uint32_t so we should remain with this internal storage. We should just make sure to always print it as hex.
-#define SCHEMA_REVISION "4" +#define SCHEMA_REVISION "5"
good, but I think we should change the schema to use uint32_t/INTEGER for the TMSI instead of text.
/* Update old TMSI */
update = dbi_conn_queryf(conn,
"UPDATE Subscriber "
"SET tmsi = '0x%08x' "
"WHERE id = %llu",
but to int :)
kind regards holger