Netware-specific changes,
PR: 780 Submitted by: Verdon Walker <VWalker@novell.com> Reviewed by: Richard Levitte
This commit is contained in:
@@ -88,7 +88,7 @@ typedef unsigned int u_int;
|
||||
#ifndef OPENSSL_NO_SOCK
|
||||
|
||||
static struct hostent *GetHostByName(char *name);
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
|
||||
static void ssl_sock_cleanup(void);
|
||||
#endif
|
||||
static int ssl_sock_init(void);
|
||||
@@ -104,6 +104,10 @@ static int host_ip(char *str, unsigned char ip[4]);
|
||||
#define SOCKET_PROTOCOL IPPROTO_TCP
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_NETWARE
|
||||
static int wsa_init_done=0;
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
static struct WSAData wsa_state;
|
||||
static int wsa_init_done=0;
|
||||
@@ -152,6 +156,15 @@ static void ssl_sock_cleanup(void)
|
||||
WSACleanup();
|
||||
}
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
static void sock_cleanup(void)
|
||||
{
|
||||
if (wsa_init_done)
|
||||
{
|
||||
wsa_init_done=0;
|
||||
WSACleanup();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ssl_sock_init(void)
|
||||
@@ -187,6 +200,27 @@ static int ssl_sock_init(void)
|
||||
SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopHookProc);
|
||||
#endif /* OPENSSL_SYS_WIN16 */
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
WORD wVerReq;
|
||||
WSADATA wsaData;
|
||||
int err;
|
||||
|
||||
if (!wsa_init_done)
|
||||
{
|
||||
|
||||
# ifdef SIGINT
|
||||
signal(SIGINT,(void (*)(int))sock_cleanup);
|
||||
# endif
|
||||
|
||||
wsa_init_done=1;
|
||||
wVerReq = MAKEWORD( 2, 0 );
|
||||
err = WSAStartup(wVerReq,&wsaData);
|
||||
if (err != 0)
|
||||
{
|
||||
BIO_printf(bio_err,"unable to start WINSOCK2, error code=%d\n",err);
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
#endif /* OPENSSL_SYS_WINDOWS */
|
||||
return(1);
|
||||
}
|
||||
@@ -348,7 +382,7 @@ redoit:
|
||||
ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len);
|
||||
if (ret == INVALID_SOCKET)
|
||||
{
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
|
||||
i=WSAGetLastError();
|
||||
BIO_printf(bio_err,"accept error %d\n",i);
|
||||
#else
|
||||
|
Reference in New Issue
Block a user