summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-07-29 19:53:57 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-07-29 19:53:57 (EDT)
commit82fc101164b4f420972bf6e25b529ffd012d89bb (patch)
treeaaf01ede8f3fbb8f33b95f9f1b3c1248d1740960
parentfed4f9938ac10c389c71c660a1c32b029440dfb1 (diff)
s_client: Fix socket FD issues
wolfSSL's error reporting and debugging messages were of no help in debugging this.
-rw-r--r--src/s_client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/s_client.c b/src/s_client.c
index ea9972d..3559728 100644
--- a/src/s_client.c
+++ b/src/s_client.c
@@ -57,7 +57,7 @@ parse_host_port(char *hostport, char **host, char **port)
return true;
}
-static _Bool
+static int
connect_socket(const char *host, const char *port)
{
struct addrinfo hints = {0};
@@ -260,6 +260,7 @@ s_client(int argc, char **argv)
ret = EXIT_FAILURE;
goto ssl_free;
}
+ wolfSSL_set_fd(ssl, sfd);
if (poll_fds(sfd, ssl) == false) {
ret = EXIT_FAILURE;