1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

r19952: Fix socketpair() test case to write to fd(1) and read from fd(0) because

when pipe files are substituting for unix domain sockets, pipes provide
only uni-directional i/o capabilities.
(This used to be commit d0a376732ed7b4f807b99a1c46c54ad1f07c85cf)
This commit is contained in:
Paul Green 2006-11-29 18:44:54 +00:00 committed by Gerald (Jerry) Carter
parent 7b249237b0
commit 0c1218cbac

View File

@ -390,14 +390,14 @@ static int test_socketpair(void)
return false;
}
if (write(sock[0], "automatisch", 12) == -1) {
if (write(sock[1], "automatisch", 12) == -1) {
printf("failure: socketpair [\n"
"write() failed: %s\n"
"]\n", strerror(errno));
return false;
}
if (read(sock[1], buf, 12) == -1) {
if (read(sock[0], buf, 12) == -1) {
printf("failure: socketpair [\n"
"read() failed: %s\n"
"]\n", strerror(errno));