projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Submitted by: "Victor B. Wagner" <vitus@cryptocom.ru>
[oweals/openssl.git]
/
apps
/
s_socket.c
diff --git
a/apps/s_socket.c
b/apps/s_socket.c
index d9321a0982593916de8cbd0eba140cf4d73eee44..b5f9db3062ea3a300c8a97bbfbf7eebe420471b6 100644
(file)
--- a/
apps/s_socket.c
+++ b/
apps/s_socket.c
@@
-264,7
+264,7
@@
static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
if (s == INVALID_SOCKET) { perror("socket"); return(0); }
if (s == INVALID_SOCKET) { perror("socket"); return(0); }
-#if
ndef OPENSSL_SYS_MPE
+#if
defined(SO_KEEPALIVE) && !defined(OPENSSL_SYS_MPE)
if (type == SOCK_STREAM)
{
i=0;
if (type == SOCK_STREAM)
{
i=0;
@@
-274,7
+274,7
@@
static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
#endif
if (connect(s,(struct sockaddr *)&them,sizeof(them)) == -1)
#endif
if (connect(s,(struct sockaddr *)&them,sizeof(them)) == -1)
- { close(s); perror("connect"); return(0); }
+ { close
socket
(s); perror("connect"); return(0); }
*sock=s;
return(1);
}
*sock=s;
return(1);
}
@@
-283,7
+283,7
@@
int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, uns
{
int sock;
char *name = NULL;
{
int sock;
char *name = NULL;
- int accept_socket;
+ int accept_socket
= 0
;
int i;
if (!init_server(&accept_socket,port,type)) return(0);
int i;
if (!init_server(&accept_socket,port,type)) return(0);