Re: [PATCH 3/3]: Convert Reset code into socket error number

2007-10-02 Thread Gerrit Renker
| +static u8 dccp_reset_code_convert(const u8 code) | +{ | + const u8 error_code[] = { | + [DCCP_RESET_CODE_CLOSED] = 0, /* normal termination */ | + [DCCP_RESET_CODE_UNSPECIFIED]= 0, /* nothing known */ | +

Re: [PATCH 3/3]: Convert Reset code into socket error number

2007-10-02 Thread Gerrit Renker
| Yes you are correct. I misread the code. | | However - I'd prefer another constant to match last in enum at the | same point as the declaration of the enum. This way if values are | added other code doesn't break. I've seen this done before quite a few | times. It is dangerous on relying

Re: [PATCH 3/3]: Convert Reset code into socket error number

2007-10-01 Thread Ian McDonald
On 9/30/07, Gerrit Renker [EMAIL PROTECTED] wrote: [DCCP]: Convert Reset code into socket error number This adds support for converting the 11 currently defined Reset codes into system error numbers, which are stored in sk_err for further interpretation. This makes the externally visible

Re: [PATCH 3/3]: Convert Reset code into socket error number

2007-10-01 Thread Ian McDonald
On 10/2/07, Arnaldo Carvalho de Melo [EMAIL PROTECTED] wrote: He used a designated initializer, i.e. he said at which index in the array it the value is to be set. So it really doesn't matter the order. And when checking if the code was within the valid range he tested against the last entry

Re: [PATCH 3/3]: Convert Reset code into socket error number

2007-10-01 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 02, 2007 at 09:07:24AM +1300, Ian McDonald escreveu: On 10/2/07, Arnaldo Carvalho de Melo [EMAIL PROTECTED] wrote: He used a designated initializer, i.e. he said at which index in the array it the value is to be set. So it really doesn't matter the order. And when checking if

[PATCH 3/3]: Convert Reset code into socket error number

2007-09-29 Thread Gerrit Renker
[DCCP]: Convert Reset code into socket error number This adds support for converting the 11 currently defined Reset codes into system error numbers, which are stored in sk_err for further interpretation. This makes the externally visible API behaviour similar to TCP, since a client connecting