[PATCH] sms: Proper decoding and storage of SMS validity period.

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

Holger Hans Peter Freyther holger at freyther.de
Thu Mar 20 21:20:33 UTC 2014


On Wed, Mar 12, 2014 at 09:06:29PM +0400, Alexander Chemeris wrote:

> +/* Decode validity period format 'relative in integer representation'.
> + * Returns number of seconds relative to a current time. */

this style of comments is only for net/* in the kernel coding style.


> +static time_t gsm340_vp_relative_integer(uint8_t *sms_vp)
>  {
>  	uint8_t vp;
> -	unsigned long minutes;
>  	vp = *(sms_vp);
>  	if (vp == 0) {
>  		LOGP(DLSMS, LOGL_ERROR,
>  		     "reserved relative_integer validity period\n");
> -		return gsm340_vp_default();
> +#warning We should return an RP-Error here.
> +		return SMS_DEFAULT_VALIDITY_PERIOD;


What does this warning mean? The code will not be able to generate
and initiate the RP-Error procedure. So how do you intend to indicate
the error condition? What should the caler do?





More information about the OpenBSC mailing list