[erlang-patches] Correctly type sctp_assoc_id [Was: [erlang-patches] SCTP improvements]
Raimo Niskanen
raimo+erlang-patches@REDACTED
Thu Dec 17 10:06:09 CET 2009
On Wed, Dec 16, 2009 at 10:38:22AM -0800, Simon Cornish wrote:
> Hi Raimo,
>
> On Wed, Dec 16, 2009 at 4:42 AM, Raimo Niskanen
> raimo+erlang-patches-at-erix.ericsson.se wrote:
> > http://github.com/erlang/otp/commit/2666b68aab2167266f49b462e3ed63e6f2045709
> > Correctly type sctp_assoc_id as signed, not unsigned
> >
> > Your patch seems to fix a bug when the returned
> > assoc_id from gen_sctp is later rejected by gen_sctp.
>
> Correct.
>
> > The patch would work, but I would rather change
> > what inet_drv returns. Something like this:
> [...]
>
> I have no preference as to the implementation of a solution. At the
> user level, the assoc_id should be considered almost opaque; I say
> "almost" because of the special zero value.
>
> > Motivation:
> >
> > The Sockets API Extensions for SCTP draft tries very
> > hard not to specify any signedness for sctp_assoc_t,
> > as you say the only defined value is 0, and that in
> > fact is the only clue I find that is an integral type.
>
> Yes, this has been a source of comment/frustration/argument since
> many-to-one was introduced.
>
> > You could if so inclined interpret it to be a struct
>
> Unfortunately the draft suggests this also.
Really, where? (I looked for any clue...)
>
> [...]
>
> > Can you rework that patch too, please?
>
> Actually, since you're the maintainer and either change is simply a
> couple of lines, wouldn't it be better for you to introduce the
> preferred solution directly into the ccase or pu branch?
>
Yes, probably. It is a bug and we have to fix it, so I will do so.
> Regards,
> Simon
>
> ________________________________________________________________
> erlang-patches mailing list. See http://www.erlang.org/faq.html
> erlang-patches (at) erlang.org
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-patches
mailing list