[PATCH] * gmtime(NULL) returns NULL at least in glibc and *can not* be used as time(NULL). Since we compare two time_t values when checking the validity period this can be replaced by time(NULL)

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/.

Nico Golde nico at ngolde.de
Wed Jun 16 13:22:30 UTC 2010


---
 openbsc/src/gsm_04_11.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/openbsc/src/gsm_04_11.c b/openbsc/src/gsm_04_11.c
index ee0aba5..5a2b231 100644
--- a/openbsc/src/gsm_04_11.c
+++ b/openbsc/src/gsm_04_11.c
@@ -305,7 +305,7 @@ static unsigned long gsm340_vp_absolute(u_int8_t *sms_vp)
 	unsigned long minutes;
 
 	expires = gsm340_scts(sms_vp);
-	now = mktime(gmtime(NULL));
+	now = time(NULL);
 	if (expires <= now)
 		minutes = 0;
 	else
-- 
1.7.1





More information about the OpenBSC mailing list