diff --git a/openbsc/src/gsm_04_11.c b/openbsc/src/gsm_04_11.c index 57d8089..faa5f69 100644 --- a/openbsc/src/gsm_04_11.c +++ b/openbsc/src/gsm_04_11.c @@ -340,14 +340,14 @@ static unsigned long gsm340_validity_period(u_int8_t sms_vpf, u_int8_t *sms_vp) /* ignore additional fi */ if (fi & (1<<7)) sms_vp++; /* read validity period format */ - switch (fi & 0b111) { - case 0b000: + switch (fi & 0x7) { + case 0x0: return gsm340_vp_default(); /* no vpf specified */ - case 0b001: + case 0x1: return gsm340_vp_relative(sms_vp); - case 0b010: + case 0x2: return gsm340_vp_relative_integer(sms_vp); - case 0b011: + case 0x3: return gsm340_vp_relative_semioctet(sms_vp); default: /* The GSM spec says that the SC should reject any ----------
-----Ursprüngliche Nachricht----- Von: openbsc-bounces@lists.gnumonks.org [mailto:openbsc-bounces@lists.gnumonks.org] Im Auftrag von Holger Freyther Gesendet: Donnerstag, 17. Juni 2010 16:26 An: openbsc@lists.gnumonks.org Betreff: Re: Problem compiling OpenBSC on Kubuntu Hardy
On 06/17/2010 10:20 PM, Luca Bertoncello wrote:
Hi, List!
gsm_04_11.c:364:8: Fehler: ungültiger Suffix »b011« an Ganzzahlkonstante
Your compiler does not like to have numbers in binary, please prepare a patch (I say that once a month and then nothing happens) to use these in hex.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am Thu, 17 Jun 2010 16:32:38 +0200 schrieb "Andreas.Eversberg" Andreas.Eversberg@versatel.de:
diff --git a/openbsc/src/gsm_04_11.c b/openbsc/src/gsm_04_11.c index 57d8089..faa5f69 100644 --- a/openbsc/src/gsm_04_11.c +++ b/openbsc/src/gsm_04_11.c @@ -340,14 +340,14 @@ static unsigned long gsm340_validity_period(u_int8_t sms_vpf, u_int8_t *sms_vp) /* ignore additional fi */ if (fi & (1<<7)) sms_vp++; /* read validity period format */
switch (fi & 0b111) {case 0b000:
switch (fi & 0x7) {case 0x0: return gsm340_vp_default(); /* no vpfspecified */
case 0b001:
case 0x1: return gsm340_vp_relative(sms_vp);
case 0b010:
case 0x2: return gsm340_vp_relative_integer(sms_vp);
case 0b011:
default: /* The GSM spec says that the SC shouldcase 0x3: return gsm340_vp_relative_semioctet(sms_vp);reject any ----------
It works! Thanks a lot! I hope, it will be added to the next version of OpenBSC... :D
Greetings! - -- _______________________________________________________________________ Luca Bertoncello Entwicklung Mail: bertoncello@netzing.de
NETZING Solutions AG Tel.: 0351/41381 - 0 Kesselsdorfer Str. 216, 01169 Dresden Fax: 0351/41381 - 12 HRB 18926 / Ust.ID DE211326547 Mail: netzing.ag@netzing.de _______________________________________________________________________
Thanks Andreas,
I've applied your patch to master.