diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-05-10 13:29:33 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-12-02 12:09:17 +0000 |
commit | 7398395cc01977aa9b41c2d433b487154b60ce2a (patch) | |
tree | 42f69c72e3d0968a5027c3bd62bdc384b0447be2 /openbsc/src/osmo-bsc/osmo_bsc_filter.c | |
parent | 1a60644eb21a5c50eddc5790444022fd5aa11df8 (diff) |
Move timezone settings up to network level
Time zone used to be configurable per-BTS. In the upcoming MSC-split, no BTS
structures will be available on the MSC level. To simplify, drop the ability to
manage several time zones in a core network and place the time zone config on
the network VTY level, i.e. in gsm_network. If we are going to re-add fine
grained time zone settings, it should probably be tied to the LAC.
Adjust time zone VTY config code (to be moved to libcommon-cs in subsequent commit).
Adjust time zone Ctrl Interface code.
Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_filter.c')
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_filter.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c index 66c6406f5..d5ca2fdda 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c @@ -270,23 +270,24 @@ static int bsc_patch_mm_info(struct gsm_subscriber_connection *conn, return 0; /* Is TZ patching enabled? */ - if (!bts->tz.override) + struct gsm_tz *tz = &bts->network->tz; + if (!tz->override) return 0; /* Convert tz.hr and tz.mn to units */ - if (bts->tz.hr < 0) { - tzunits = -bts->tz.hr*4; + if (tz->hr < 0) { + tzunits = -tz->hr*4; tzbsd |= 0x08; } else - tzunits = bts->tz.hr*4; + tzunits = tz->hr*4; - tzunits = tzunits + (bts->tz.mn/15); + tzunits = tzunits + (tz->mn/15); tzbsd |= (tzunits % 10)*0x10 + (tzunits / 10); /* Convert DST value */ - if (bts->tz.dst >= 0 && bts->tz.dst <= 2) - dst = bts->tz.dst; + if (tz->dst >= 0 && tz->dst <= 2) + dst = tz->dst; if (TLVP_PRESENT(&tp, GSM48_IE_UTC)) { LOGP(DMSC, LOGL_DEBUG, |