aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSanne Raymaekers <sraymaek@redhat.com>2018-10-25 18:38:32 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-10-25 18:49:29 +0200
commitced05eb6dbbd9a20f0b96a454203a8d158157123 (patch)
tree684ea99d98350a51ea1fae679b234802fc70c213 /tests
parentb796924fea7e61a4a8813acce9e510f2359aee34 (diff)
downloadlibssh-ced05eb6dbbd9a20f0b96a454203a8d158157123.tar.gz
libssh-ced05eb6dbbd9a20f0b96a454203a8d158157123.tar.xz
libssh-ced05eb6dbbd9a20f0b96a454203a8d158157123.zip
socket: Undouble socket fds
Signed-off-by: Sanne Raymaekers <sraymaek@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/torture_packet.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/unittests/torture_packet.c b/tests/unittests/torture_packet.c
index 61f4b049..f94e4a10 100644
--- a/tests/unittests/torture_packet.c
+++ b/tests/unittests/torture_packet.c
@@ -104,8 +104,7 @@ static void torture_packet(const char *cipher,
assert_non_null(session->out_buffer);
ssh_buffer_add_data(session->out_buffer, test_data, payload_len);
- session->socket->fd_out = sockets[0];
- session->socket->fd_in = -2;
+ session->socket->fd = sockets[0];
session->socket->write_wontblock = 1;
rc = ssh_packet_send(session);
assert_int_equal(rc, SSH_OK);
@@ -126,8 +125,7 @@ static void torture_packet(const char *cipher,
}
close(sockets[0]);
close(sockets[1]);
- session->socket->fd_in = SSH_INVALID_SOCKET;
- session->socket->fd_out = SSH_INVALID_SOCKET;
+ session->socket->fd = SSH_INVALID_SOCKET;
ssh_free(session);
}