mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 15:32:35 +00:00
Address FD was not read from when used bidirectionally
This commit is contained in:
parent
ce3714c553
commit
af241ab40f
3 changed files with 16 additions and 3 deletions
3
CHANGES
3
CHANGES
|
@ -239,6 +239,9 @@ corrections:
|
|||
UDP-LISTEN failed with "...is not available". Thanks to Fred for
|
||||
reporting this problem
|
||||
|
||||
Address FD was not read from when used bidirectionally. Thanks to David
|
||||
Halls for reporting this bug.
|
||||
|
||||
porting:
|
||||
Red Hat issue 1020203: configure checks fail with some compilers.
|
||||
Use case: clang
|
||||
|
|
14
test.sh
14
test.sh
|
@ -3968,7 +3968,7 @@ testchain "$N" "$TEST" "test|^test|test|^test|test|^test|test|^test|stdio" "pipe
|
|||
esac
|
||||
N=$((N+1))
|
||||
|
||||
NAME=TOWLONGCHAINS
|
||||
NAME=TWOLONGCHAINS
|
||||
case "$TESTS" in
|
||||
*%$N%*|*%functions%*|*%chain%*|*%$NAME%*)
|
||||
TEST="$NAME: four-tests+stdio vs. four-tests+pipe"
|
||||
|
@ -12645,7 +12645,17 @@ esac
|
|||
N=$((N+1))
|
||||
|
||||
|
||||
echo "summary: $((N-1)) tests, $((numOK+numFAILED+numCANT)) selected; $numOK ok, $numFAIL failed, $numCANT could not be performed"
|
||||
NAME=FD_BI_WRITE
|
||||
case "$TESTS" in
|
||||
*%$N%*|*%functions%*|*%chain%*|*%$NAME%*)
|
||||
TEST="$NAME: FD address in birectional context is"
|
||||
testecho "$N" "$TEST" "FD:0" "FD:1" "-T 2 $opts" "$val_t"
|
||||
esac
|
||||
N=$((N+1))
|
||||
|
||||
|
||||
|
||||
echo "summary: $((N-1)) tests, $((numOK+numFAIL+numCANT)) selected; $numOK ok, $numFAIL failed, $numCANT could not be performed"
|
||||
|
||||
if [ "$numFAIL" -gt 0 ]; then
|
||||
echo "FAILED: $listFAIL"
|
||||
|
|
|
@ -61,8 +61,8 @@ static int xioopen_fdnum(int argc, const char *argv[], struct opt *opts,
|
|||
}
|
||||
} else {
|
||||
if (XIOWITHWR(rw)) {
|
||||
numrfd = numfd1;
|
||||
numwfd = numfd1;
|
||||
numrfd = -1;
|
||||
} else {
|
||||
numrfd = numfd1;
|
||||
numwfd = -1;
|
||||
|
|
Loading…
Reference in a new issue