mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +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
|
UDP-LISTEN failed with "...is not available". Thanks to Fred for
|
||||||
reporting this problem
|
reporting this problem
|
||||||
|
|
||||||
|
Address FD was not read from when used bidirectionally. Thanks to David
|
||||||
|
Halls for reporting this bug.
|
||||||
|
|
||||||
porting:
|
porting:
|
||||||
Red Hat issue 1020203: configure checks fail with some compilers.
|
Red Hat issue 1020203: configure checks fail with some compilers.
|
||||||
Use case: clang
|
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
|
esac
|
||||||
N=$((N+1))
|
N=$((N+1))
|
||||||
|
|
||||||
NAME=TOWLONGCHAINS
|
NAME=TWOLONGCHAINS
|
||||||
case "$TESTS" in
|
case "$TESTS" in
|
||||||
*%$N%*|*%functions%*|*%chain%*|*%$NAME%*)
|
*%$N%*|*%functions%*|*%chain%*|*%$NAME%*)
|
||||||
TEST="$NAME: four-tests+stdio vs. four-tests+pipe"
|
TEST="$NAME: four-tests+stdio vs. four-tests+pipe"
|
||||||
|
@ -12645,7 +12645,17 @@ esac
|
||||||
N=$((N+1))
|
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
|
if [ "$numFAIL" -gt 0 ]; then
|
||||||
echo "FAILED: $listFAIL"
|
echo "FAILED: $listFAIL"
|
||||||
|
|
|
@ -61,8 +61,8 @@ static int xioopen_fdnum(int argc, const char *argv[], struct opt *opts,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (XIOWITHWR(rw)) {
|
if (XIOWITHWR(rw)) {
|
||||||
|
numrfd = numfd1;
|
||||||
numwfd = numfd1;
|
numwfd = numfd1;
|
||||||
numrfd = -1;
|
|
||||||
} else {
|
} else {
|
||||||
numrfd = numfd1;
|
numrfd = numfd1;
|
||||||
numwfd = -1;
|
numwfd = -1;
|
||||||
|
|
Loading…
Reference in a new issue