Re: WARNING: SMPP: PDU element password to long (length is 9, should be 9)

2004-08-11 Thread Aarno Syvänen
The entity is NULTERMINATED, octet string is not. So \0 is added, in the last line, and that's why the comparison is =. And of course, max-octets does not include terminating \0. Aarno Aarno On 11.8.2004, at 01:17, Stipe Tolj wrote: Stipe Tolj wrote: Ok, now about the warning. I see this in

Re: WARNING: SMPP: PDU element password to long (length is 9, should be 9)

2004-08-11 Thread Stipe Tolj
Aarno Syvänen wrote: The entity is NULTERMINATED, octet string is not. So \0 is added, in the last line, and that's why the comparison is =. And of course, max-octets does not include terminating \0. ok, but is the equal comparison realy required? wouldn't be enough? Stipe

Re: WARNING: SMPP: PDU element password to long (length is 9, should be 9)

2004-08-11 Thread Stipe Tolj
Alexander Malysh wrote: NULTERMINATED as Aarno pointed already, is C string with terminating \0. max-octets is _including_ terminating \0. comparison is no enough, because if octstr len even equal to max-octets than that means we will drop 1 octet (because \0 will be added at the end), so the

WARNING: SMPP: PDU element password to long (length is 9, should be 9)

2004-08-10 Thread Alan McNatty
] WARNING: SMPP: PDU element password to long (length is 9, should be 9)

Re: WARNING: SMPP: PDU element password to long (length is 9, should be 9)

2004-08-10 Thread Stipe Tolj
Pedro B. wrote: Let alone the fact that too long is not spelled correctly. At least in 10 locations of the code. and i only checked 4 .c files. as I said. Patches in 'diff -u' format always welcome ;) So if you spott something, send in a patch and we'll apply it. I'm sorry for what i'm about to

Re: WARNING: SMPP: PDU element password to long (length is 9, should be 9)

2004-08-10 Thread Pedro B.
Stipe Tolj wrote: Pedro B. wrote: So this is a generic trade-off situation. Would you pick rather a good software/system architect that is not perfect in english, or have a person that does not any grammer typos, but fails to understand and inherit crussial system design aspects? That's why i

Re: WARNING: SMPP: PDU element password to long (length is 9, should be 9)

2004-08-10 Thread Stipe Tolj
Stipe Tolj wrote: Ok, now about the warning. I see this in gw/smsc/smpp_pdu.c:236: ... #define NULTERMINATED(name, max_octets) \ if (p-name != NULL) { \ if (octstr_len(p-name) = max_octets) { \ warning(0, SMPP: PDU element %s to long \