aboutsummaryrefslogtreecommitdiff
path: root/common/request.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-04-16 11:33:11 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-04-16 11:33:11 -0400
commita60a9d10ce94acc0c5bfed2a20c8bed4e91be725 (patch)
tree59cfacd7c0460817b434768fac12a8c56ae2c946 /common/request.f90
parentefb5d8cec9531637c91fc1087f9c83b4d89a5612 (diff)
downloadlevitating-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.f905
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