X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=socklib.c;fp=socklib.c;h=ef06c673b59639333af56cf668f59d57005b0bcd;hb=4100ec454bccc3aa0b7d98cd5cbcb736e62fb4dc;hp=c34ef6b88c45cb07cf3229dbf5648d28c8a52ab2;hpb=2b8157e85d6318a06582c98eb8f94005ae0a98c6;p=tridge%2Fdbench.git diff --git a/socklib.c b/socklib.c index c34ef6b..ef06c67 100644 --- a/socklib.c +++ b/socklib.c @@ -29,6 +29,7 @@ int open_socket_in(int type, int port, uint32 socket_addr) char host_name[1000]; int res; int one=1; + extern char *tcp_options; /* get my host name */ if (gethostname(host_name, sizeof(host_name)) == -1) { @@ -62,6 +63,8 @@ int open_socket_in(int type, int port, uint32 socket_addr) return(-1); } + set_socket_options(res, tcp_options); + return res; } @@ -74,6 +77,7 @@ int open_socket_out(char *host, int port) struct sockaddr_in sock_out; int res; struct hostent *hp; + extern char *tcp_options; res = socket(PF_INET, type, 0); if (res == -1) { @@ -90,6 +94,8 @@ int open_socket_out(char *host, int port) sock_out.sin_port = htons(port); sock_out.sin_family = PF_INET; + set_socket_options(res, tcp_options); + if (connect(res,(struct sockaddr *)&sock_out,sizeof(sock_out))) { close(res); fprintf(stderr,"failed to connect to %s - %s\n",