#include <openssl/ssl.h>
static struct hostent *GetHostByName(char *name);
+#ifdef WINDOWS
static void sock_cleanup(void);
+#endif
static int sock_init(void);
static int init_client_ip(int *sock,unsigned char ip[4], int port);
static int init_server(int *sock, int port);
#endif /* WIN32 */
#endif /* WINDOWS */
+#ifdef WINDOWS
static void sock_cleanup(void)
{
-#ifdef WINDOWS
if (wsa_init_done)
{
wsa_init_done=0;
WSACancelBlockingCall();
WSACleanup();
}
-#endif
}
+#endif
static int sock_init(void)
{
return(0);
}
i=(*cb)(name,sock, context);
- if (name != NULL) Free(name);
+ if (name != NULL) OPENSSL_free(name);
SHUTDOWN2(sock);
if (i < 0)
{
}
else
{
- if ((*host=(char *)Malloc(strlen(h1->h_name)+1)) == NULL)
+ if ((*host=(char *)OPENSSL_malloc(strlen(h1->h_name)+1)) == NULL)
{
- perror("Malloc");
+ perror("OPENSSL_malloc");
return(0);
}
strcpy(*host,h1->h_name);