< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] representing qvalues as integers instead of floats


My interpretation is that it will now return an integer between 0 and
1000. I agree this is a good idea.

In order to make sure that folks fix their applications, I propose
that we change the api slightly as well.

Currently, the only float value is p_q. e.g. 
float q = msg.header(h_RequestLine).param(p_q);

I propose that we remove the p_q parameter and replace it with
p_qvalue which will return an int. e.g.
int q = msg.header(h_RequestLine).param(p_qvalue)

This will at least force the compiler to let everybody know that they
need to change code.

Thoughts? 

Jason



On 8/11/05, Adam Roach <adam@xxxxxxxxxxx> wrote:
> Dan Weber wrote:
> 
> > Rohan Mahy wrote:
> >
> >> Hi,
> >>
> >> I just checked in some code in ParserBuffer.cxx that parses a q-value
> >> and returns an integer between 0 and 1000.
> >
> > As well, it might make sense to use an enum to set the appropriate value.
> >
> 
> I must be misreading what you are proposing. The only interpretation
> that I can come up with is that you are suggesting that we have an enum
> containing 1001 values, something like:
> 
> enum qvalues
> {
>   Q0_000 = 0,
>   Q0_001 = 1,
>   Q0_002 = 2,
>   Q0_003 = 3,
>   ...
>   Q0_999 = 999,
>   Q1_000 = 1000
> };
> 
> Is that really what you meant?
> 
> /a
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>