From db9c064dd4d0bd9da907db75d4a598dd0a5a8c75 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 22 Feb 2016 12:16:55 +0100 Subject: osmo-bsc: half-fix tz override to allow compilation As described in a comment, for MSCSPLIT the tz data has been moved to network level. To allow compiling osmo-bsc on the sysmocom-iu branch, move tz up to network level in osmo-bsc as well. This could be done better for osmo-bsc, rather easily too, still allowing per-BTS timezone settings. But I'm trying to focus on IuCS and would like to come back to this later. --- openbsc/src/osmo-bsc/osmo_bsc_filter.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'openbsc/src/osmo-bsc/osmo_bsc_filter.c') diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c index 389a124fd..b68fccd18 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, -- cgit v1.2.3