[FIX 2/2] fixup! sms: Fix support of negative timezone offsets in gsm340_gen_scts().

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Daniel Willmann dwillmann at sysmocom.de
Wed Mar 26 21:44:43 UTC 2014


---
 src/gsm/gsm0411_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c
index 3052dd7..b8a7b10 100644
--- a/src/gsm/gsm0411_utils.c
+++ b/src/gsm/gsm0411_utils.c
@@ -89,7 +89,7 @@ void gsm340_gen_scts(uint8_t *scts, time_t time)
 	if (tm->tm_gmtoff >= 0)
 		*scts++ = gsm411_bcdify(tm->tm_gmtoff/(60*15));
 	else
-		*scts++ = gsm411_bcdify(-tm->tm_gmtoff/(60*15)) | 0x80;
+		*scts++ = gsm411_bcdify(-tm->tm_gmtoff/(60*15)) | 0x08;
 #else
 #warning find a portable way to obtain timezone offset
 	*scts++ = 0;
-- 
1.8.4.2





More information about the OpenBSC mailing list