Index: ossp-pkg/sa/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/sa/ChangeLog,v rcsdiff -q -kk '-r1.37' '-r1.38' -u '/v/ossp/cvs/ossp-pkg/sa/ChangeLog,v' 2>/dev/null --- ChangeLog 2004/06/11 10:32:54 1.37 +++ ChangeLog 2004/06/26 11:16:02 1.38 @@ -11,6 +11,13 @@ This is a list of all changes to OSSP sa. For a more brief summary please have a look at the NEWS file. + Changes between 1.2.1 and 1.2.2 (11-Jun-2004 to 26-Jun-2004) + + o Allow negative values for SA_OPTION_LINGER to cover the + special case of l_onoff=1/l_linger=0 where a TCP RST + based connection termination is performed on close(2). + [Alexandre Balaban ] + Changes between 1.2.0 and 1.2.1 (02-Apr-2003 to 11-Jun-2004) o Fix timeout implementation related to SO_RCVTIMEO/SO_SNDTIMEO. Index: ossp-pkg/sa/THANKS RCS File: /v/ossp/cvs/ossp-pkg/sa/THANKS,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/sa/THANKS,v' 2>/dev/null --- THANKS 2004/04/02 18:21:07 1.5 +++ THANKS 2004/06/26 11:16:02 1.6 @@ -17,6 +17,7 @@ Credit has to be given to the following people who contributed ideas, bugfixes, hints, gave platform feedback, etc. (in alphabetical order): + o Alexandre Balaban o Ulrich Dessauer o Brian T. Egleston o Michael van Elst Index: ossp-pkg/sa/sa.c RCS File: /v/ossp/cvs/ossp-pkg/sa/sa.c,v rcsdiff -q -kk '-r1.83' '-r1.84' -u '/v/ossp/cvs/ossp-pkg/sa/sa.c,v' 2>/dev/null --- sa.c 2004/06/11 10:30:34 1.83 +++ sa.c 2004/06/26 11:16:02 1.84 @@ -989,7 +989,7 @@ #if defined(SO_LINGER) struct linger linger; linger.l_onoff = (sa->optInfo[i].value == 0 ? 0 : 1); - linger.l_linger = sa->optInfo[i].value; + linger.l_linger = (sa->optInfo[i].value <= 0 ? 0 : sa->optInfo[i].value); if (setsockopt(sa->fdSocket, SOL_SOCKET, SO_LINGER, (const void *)&linger, (socklen_t)sizeof(struct linger)) < 0) @@ -1339,7 +1339,7 @@ } case SA_OPTION_LINGER: { #if defined(SO_LINGER) - int amount = ((int)va_arg(ap, int) ? 1 : 0); + int amount = (int)va_arg(ap, int); sa->optInfo[SA_OPTION_LINGER].value = amount; sa->optInfo[SA_OPTION_LINGER].todo = TRUE; #else Index: ossp-pkg/sa/sa.pod RCS File: /v/ossp/cvs/ossp-pkg/sa/sa.pod,v rcsdiff -q -kk '-r1.40' '-r1.41' -u '/v/ossp/cvs/ossp-pkg/sa/sa.pod,v' 2>/dev/null --- sa.pod 2004/04/02 18:21:07 1.40 +++ sa.pod 2004/06/26 11:16:02 1.41 @@ -460,8 +460,11 @@ disabling (I == C<0>) Nagle's Algorithm (see RFC898). C (C I) for enabling (I == -I E C<0>) or disabling (I == C<0>) lingering on -close (see C of setsockopt(2)). +I != C<0>) or disabling (I == C<0>) lingering on close +(see C of setsockopt(2)). Notice: using I E C<0> +results in a regular (maximum of I lasting) lingering on close +while using I E C<0> results in the special case of a TCP +RST based connection termination on close. C (C I) for enabling (I == C<1>) or disabling (I == C<0>) the reusability of the address on