#ifndef OPENSSL_NO_SOCK
-#ifdef OPENSSL_SYS_WIN16
-#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
-#else
-#define SOCKET_PROTOCOL IPPROTO_TCP
-#endif
-
#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
#undef FIONBIO
c->them.sin_addr.s_addr=htonl(l);
c->state=BIO_CONN_S_CREATE_SOCKET;
- ret=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
+ ret=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
if (ret == INVALID_SOCKET)
{
SYSerr(SYS_F_SOCKET,get_last_socket_error());
}
c->state=BIO_CONN_S_CONNECT;
-#if defined(SO_KEEPALIVE) && !defined(OPENSSL_SYS_MPE)
+#if defined(SO_KEEPALIVE)
i=1;
i=setsockopt(b->num,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
if (i < 0)
break;
case BIO_C_DO_STATE_MACHINE:
/* use this one to start the connection */
- if (!data->state != BIO_CONN_S_OK)
+ if (data->state != BIO_CONN_S_OK)
ret=(long)conn_state(b,data);
else
ret=1;
break;
case BIO_CTRL_GET_CALLBACK:
{
- int (**fptr)(const BIO *bio,int state,int ret);
+ int (**fptr)(const BIO *bio,int state,int xret);
- fptr=(int (**)(const BIO *bio,int state,int ret))ptr;
+ fptr=(int (**)(const BIO *bio,int state,int xret))ptr;
*fptr=data->info_callback;
}
break;
return(ret);
}
-BIO *BIO_new_connect(char *str)
+BIO *BIO_new_connect(const char *str)
{
BIO *ret;