[ofw] RE: [PATCH] uDAPL v2: scm: client side setsockopt NODELAY fails if data arrives before setting

Davis, Arlin R arlin.r.davis at intel.com
Tue Nov 24 16:36:52 PST 2009


 
>On Tue, Nov 24, 2009 at 04:16:16PM -0800, Davis, Arlin R wrote:
>
>> -	return ioctlsocket(s, FIONBIO, &nonblocking);
>> +	int ret, opt;
>> +
>> +	ret = ioctlsocket(s, FIONBIO, &nonblocking);
>> +
>> +	/* no delay for small packets */
>> +	if (!ret)
>> +		ret = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, 
>> +				 (char *)&opt, sizeof(opt));
>> +	return ret;
>>  }
>
>You probably need to initialize opt..
>

Good catch. Thanks Jason.


More information about the ofw mailing list