diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-04-30 05:58:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:25 -0500 |
commit | c2cc10c7869221c7f43cbbb151feb4c4db173cb9 (patch) | |
tree | ed23d0cc677288c81b317b4d7f82567622b032c6 /source4/torture/local | |
parent | 4bdc83ad5c7cfb7c33dc7e4b02316c35a589c299 (diff) | |
download | samba-c2cc10c7869221c7f43cbbb151feb4c4db173cb9.tar.gz samba-c2cc10c7869221c7f43cbbb151feb4c4db173cb9.tar.bz2 samba-c2cc10c7869221c7f43cbbb151feb4c4db173cb9.zip |
r15356: Remove unused 'flags' argument from socket_send() and friends.
This is in preperation for making TLS a socket library.
Andrew Bartlett
(This used to be commit a312812b92f5ac7e6bd2c4af725dbbbc900d4452)
Diffstat (limited to 'source4/torture/local')
-rw-r--r-- | source4/torture/local/socket.c | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/source4/torture/local/socket.c b/source4/torture/local/socket.c index 9a29ef0fec..91bd3b5315 100644 --- a/source4/torture/local/socket.c +++ b/source4/torture/local/socket.c @@ -82,10 +82,10 @@ static BOOL test_udp(TALLOC_CTX *mem_ctx) generate_random_buffer(blob.data, blob.length); sent = size; - status = socket_sendto(sock2, &blob, &sent, 0, srv_addr); + status = socket_sendto(sock2, &blob, &sent, srv_addr); CHECK_STATUS(status, NT_STATUS_OK); - status = socket_recvfrom(sock1, blob2.data, size, &nread, 0, + status = socket_recvfrom(sock1, blob2.data, size, &nread, sock1, &from_addr); CHECK_STATUS(status, NT_STATUS_OK); @@ -104,10 +104,10 @@ static BOOL test_udp(TALLOC_CTX *mem_ctx) } generate_random_buffer(blob.data, blob.length); - status = socket_sendto(sock1, &blob, &sent, 0, from_addr); + status = socket_sendto(sock1, &blob, &sent, from_addr); CHECK_STATUS(status, NT_STATUS_OK); - status = socket_recvfrom(sock2, blob2.data, size, &nread, 0, + status = socket_recvfrom(sock2, blob2.data, size, &nread, sock2, &from_addr); CHECK_STATUS(status, NT_STATUS_OK); if (strcmp(from_addr->addr, srv_addr->addr) != 0) { @@ -195,10 +195,10 @@ static BOOL test_tcp(TALLOC_CTX *mem_ctx) generate_random_buffer(blob.data, blob.length); sent = size; - status = socket_send(sock2, &blob, &sent, 0); + status = socket_send(sock2, &blob, &sent); CHECK_STATUS(status, NT_STATUS_OK); - status = socket_recv(sock3, blob2.data, size, &nread, 0); + status = socket_recv(sock3, blob2.data, size, &nread); CHECK_STATUS(status, NT_STATUS_OK); from_addr = socket_get_peer_addr(sock3, mem_ctx); @@ -217,38 +217,7 @@ static BOOL test_tcp(TALLOC_CTX *mem_ctx) } if (memcmp(blob2.data, blob.data, size) != 0) { - printf("Bad data in recvfrom\n"); - ret = False; - } - - generate_random_buffer(blob.data, blob.length); - status = socket_send(sock3, &blob, &sent, 0); - CHECK_STATUS(status, NT_STATUS_OK); - - status = socket_recv(sock2, blob2.data, size, &nread, 0); - CHECK_STATUS(status, NT_STATUS_OK); - - from_addr = socket_get_peer_addr(sock2, mem_ctx); - - if (!from_addr || !from_addr->addr) { - printf("Unexpected recvfrom addr NULL\n"); - return False; - } - if (strcmp(from_addr->addr, srv_addr->addr) != 0) { - printf("Unexpected recvfrom addr %s\n", from_addr ? from_addr->addr : NULL); - ret = False; - } - if (nread != size) { - printf("Unexpected recvfrom size %d should be %d\n", (int)nread, (int)size); - ret = False; - } - if (from_addr->port != srv_addr->port) { - printf("Unexpected recvfrom port %d should be %d\n", - from_addr->port, srv_addr->port); - ret = False; - } - if (memcmp(blob2.data, blob.data, size) != 0) { - printf("Bad data in recvfrom\n"); + printf("Bad data in recv\n"); ret = False; } |