Re: [RFC] get rid of inconsistent -1 values

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization Centrium GmbH
Message-ID <[email protected]>
Hi,

@Bruno: nice to see you back ;)

On Thursday 18 September 2003 00:40, Bruno Rodrigues wrote:
[snip]
>
> I've done this msg initialization hack because I had problems with mt_reply
> messages with errors, where mt_reply would inherit values from mo messsage
> (think reply-* messages).

ahh, then I guessed correctly!? 

>
> > (if we start to _hack_ the code in such order, then we doesn't need
> > msg-decl.h at all. I see this sniplet as: I want that UNDEF values are
> > -1, but it doesn't work as I want, so I do simple hack rather as: heh I
> > must fix all other messages types too and do it)
>
> parse error
>
> > And now to these '-1' values. At first it's inconsistent to have -1
> > values only for sms values. If we want to have '-1' == UNDEF then _all_
> > message types should use it and not only sms and I do not see any goal to
> > have these? am I wrong?
>
> Is it really required to be consistent with other message types (are you
> talking about wap messages ?)

I'm talking about all message types: heartbeat,admin, sms, ack, wdp_datagram
imo, these UNDEF values should be consistent  either 0 or -1  (as it was the 
case before).

>
> > then please explain why -1 should be better as 0 (zero)?
>
> If you have a specification (etsi 03.38 and 03.40) that talks about 0-x,
> it was getting difficult to explain that etsi's message class 0-3 would
> be kannel's 1-4. Another example is that you want to set pid=0 and
> pid=undef (no pid value at all in smsc pdu).

agreed!!!

>
> > Only one thing I can see is: sendsms interface can use sms values (e.g.
> > mclass) as is (0-3).
>
> As long as they are consistent in sendsms requests in and out and log
> files...
>
> > So (imo) we have 2 options:
> >        1) make all message types consistent, means using -1 as UNDEF
> > values
>
> Really required ?

It's required (just look your ugly hack).. It's just cleaner to have one UNDEF 
value for all message types instead of -1 for sms , 0 for all others (and in 
future maybe -2 for msg type xyz). UNDEF values requre to be constistent 
across all msg types (imo).

>
> >        2) get rid of -1 UNDEF values for sms message type.
>
> I'm -0 for getting rid internally, -1 for getting rid in external
> interfaces

Ok then we have three options now:
	3) get rid of -1 UNDEF values internally , but leave it in external 
interfaces.

>
> > Comments and votes please....

-- 
Best regards / Mit besten Grüßen aus Düsseldorf

Dipl.-Ing.
Alexander Malysh
___________________________________________

Centrium GmbH
Vogelsanger Weg 80
40470 Düsseldorf

Fon: +49 (0211) 74 84 51 80
Fax: +49 (0211) 277 49 109

email: [email protected]
web: www.centrium.de
msn: [email protected]
icq: 98063111
___________________________________________

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.