diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-04-16 11:33:11 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-04-16 11:33:11 -0400 |
commit | a60a9d10ce94acc0c5bfed2a20c8bed4e91be725 (patch) | |
tree | 59cfacd7c0460817b434768fac12a8c56ae2c946 /common/request.f90 | |
parent | efb5d8cec9531637c91fc1087f9c83b4d89a5612 (diff) | |
download | levitating-a60a9d10ce94acc0c5bfed2a20c8bed4e91be725.tar.gz levitating-a60a9d10ce94acc0c5bfed2a20c8bed4e91be725.zip |
Fixed issue with connect calls that were manifested on macOS.
Diffstat (limited to 'common/request.f90')
-rw-r--r-- | common/request.f90 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/request.f90 b/common/request.f90 index fe4d970..ce81ae6 100644 --- a/common/request.f90 +++ b/common/request.f90 @@ -90,7 +90,7 @@ contains type(c_ptr)::ssl_method conn%code = CONNECTION_NONE - + ! Lookup host conn%host = gethostbyname(server) if((.not. allocated(conn%host%h_name)) .or. (conn%host%h_addr4 == 0)) then @@ -106,8 +106,11 @@ contains else sa%sin_port = htons(1965) end if + conn%socket = socket(AF_INET, SOCK_STREAM, 0) + if(.not. connect(conn%socket, sa)) then + Print *, "Errno is ", ierrno() conn%code = CONNECTION_SOCKET_FAILURE return end if |