} ghbn_cache[GHBN_NUM];
#ifndef NOPROTO
-static int get_ip(char *str,unsigned char *ip);
+static int get_ip(const char *str,unsigned char *ip);
static void ghbn_free(struct hostent *a);
static struct hostent *ghbn_dup(struct hostent *a);
#else
#endif
int BIO_get_host_ip(str,ip)
-char *str;
+const char *str;
unsigned char *ip;
{
int i;
}
int BIO_get_port(str,port_ptr)
-char *str;
+const char *str;
unsigned short *port_ptr;
{
int i;
{
int i;
+ if(a == NULL)
+ return;
+
if (a->h_aliases != NULL)
{
for (i=0; a->h_aliases[i] != NULL; i++)
}
struct hostent *BIO_gethostbyname(name)
-char *name;
+const char *name;
{
struct hostent *ret;
int i,lowi=0,j;
/* The reason I have implemented this instead of using sscanf is because
* Visual C 1.52c gives an unresolved external when linking a DLL :-( */
static int get_ip(str,ip)
-char *str;
+const char *str;
unsigned char ip[4];
{
unsigned int tmp[4];
struct sockaddr_in server,client;
int s= -1,cs;
unsigned char ip[4];
- short port;
- char *str,*h,*p,*e;
+ unsigned short port;
+ char *str,*e;
+ const char *h,*p;
unsigned long l;
int err_num;
memset((char *)&server,0,sizeof(server));
server.sin_family=AF_INET;
- server.sin_port=htons((unsigned short)port);
+ server.sin_port=htons(port);
if (strcmp(h,"*") == 0)
server.sin_addr.s_addr=INADDR_ANY;
int ret=INVALID_SOCKET;
static struct sockaddr_in from;
unsigned long l;
- short port;
+ unsigned short port;
int len;
char *p;