projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added BIO_vprintf() and BIO_vsnprintf(). The former because I've
[oweals/openssl.git]
/
crypto
/
bio
/
bss_conn.c
diff --git
a/crypto/bio/bss_conn.c
b/crypto/bio/bss_conn.c
index f0466adca3045df42ac67fa254b766ef8e539095..7ed26f358f8e42bd0888b63951bdf2b798fb7799 100644
(file)
--- a/
crypto/bio/bss_conn.c
+++ b/
crypto/bio/bss_conn.c
@@
-104,7
+104,7
@@
static int conn_puts(BIO *h, const char *str);
static long conn_ctrl(BIO *h, int cmd, long arg1, void *arg2);
static int conn_new(BIO *h);
static int conn_free(BIO *data);
static long conn_ctrl(BIO *h, int cmd, long arg1, void *arg2);
static int conn_new(BIO *h);
static int conn_free(BIO *data);
-static long conn_callback_ctrl(BIO *h, int cmd,
void (*fp)()
);
+static long conn_callback_ctrl(BIO *h, int cmd,
bio_info_cb *
);
static int conn_state(BIO *b, BIO_CONNECT *c);
static void conn_close_socket(BIO *data);
static int conn_state(BIO *b, BIO_CONNECT *c);
static void conn_close_socket(BIO *data);
@@
-165,7
+165,7
@@
static int conn_state(BIO *b, BIO_CONNECT *c)
break;
}
if (c->param_port != NULL)
break;
}
if (c->param_port != NULL)
-
F
ree(c->param_port);
+
OPENSSL_f
ree(c->param_port);
c->param_port=BUF_strdup(p);
}
}
c->param_port=BUF_strdup(p);
}
}
@@
-322,7
+322,7
@@
BIO_CONNECT *BIO_CONNECT_new(void)
{
BIO_CONNECT *ret;
{
BIO_CONNECT *ret;
- if ((ret=(BIO_CONNECT *)
M
alloc(sizeof(BIO_CONNECT))) == NULL)
+ if ((ret=(BIO_CONNECT *)
OPENSSL_m
alloc(sizeof(BIO_CONNECT))) == NULL)
return(NULL);
ret->state=BIO_CONN_S_BEFORE;
ret->param_hostname=NULL;
return(NULL);
ret->state=BIO_CONN_S_BEFORE;
ret->param_hostname=NULL;
@@
-344,10
+344,10
@@
void BIO_CONNECT_free(BIO_CONNECT *a)
return;
if (a->param_hostname != NULL)
return;
if (a->param_hostname != NULL)
-
F
ree(a->param_hostname);
+
OPENSSL_f
ree(a->param_hostname);
if (a->param_port != NULL)
if (a->param_port != NULL)
-
F
ree(a->param_port);
-
F
ree(a);
+
OPENSSL_f
ree(a->param_port);
+
OPENSSL_f
ree(a);
}
BIO_METHOD *BIO_s_connect(void)
}
BIO_METHOD *BIO_s_connect(void)
@@
-507,13
+507,13
@@
static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
if (num == 0)
{
if (data->param_hostname != NULL)
if (num == 0)
{
if (data->param_hostname != NULL)
-
F
ree(data->param_hostname);
+
OPENSSL_f
ree(data->param_hostname);
data->param_hostname=BUF_strdup(ptr);
}
else if (num == 1)
{
if (data->param_port != NULL)
data->param_hostname=BUF_strdup(ptr);
}
else if (num == 1)
{
if (data->param_port != NULL)
-
F
ree(data->param_port);
+
OPENSSL_f
ree(data->param_port);
data->param_port=BUF_strdup(ptr);
}
else if (num == 2)
data->param_port=BUF_strdup(ptr);
}
else if (num == 2)
@@
-524,7
+524,7
@@
static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
sprintf(buf,"%d.%d.%d.%d",
p[0],p[1],p[2],p[3]);
if (data->param_hostname != NULL)
sprintf(buf,"%d.%d.%d.%d",
p[0],p[1],p[2],p[3]);
if (data->param_hostname != NULL)
-
F
ree(data->param_hostname);
+
OPENSSL_f
ree(data->param_hostname);
data->param_hostname=BUF_strdup(buf);
memcpy(&(data->ip[0]),ptr,4);
}
data->param_hostname=BUF_strdup(buf);
memcpy(&(data->ip[0]),ptr,4);
}
@@
-534,7
+534,7
@@
static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
sprintf(buf,"%d",*(int *)ptr);
if (data->param_port != NULL)
sprintf(buf,"%d",*(int *)ptr);
if (data->param_port != NULL)
-
F
ree(data->param_port);
+
OPENSSL_f
ree(data->param_port);
data->param_port=BUF_strdup(buf);
data->port= *(int *)ptr;
}
data->param_port=BUF_strdup(buf);
data->port= *(int *)ptr;
}
@@
-574,7
+574,7
@@
static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
if (data->param_hostname)
BIO_set_conn_hostname(dbio,data->param_hostname);
BIO_set_nbio(dbio,data->nbio);
if (data->param_hostname)
BIO_set_conn_hostname(dbio,data->param_hostname);
BIO_set_nbio(dbio,data->nbio);
-
(void)BIO_set_info_callback(dbio,(void *(*)())(data->info_callback)
);
+
(void)BIO_set_info_callback(dbio,data->info_callback
);
}
break;
case BIO_CTRL_SET_CALLBACK:
}
break;
case BIO_CTRL_SET_CALLBACK:
@@
-602,7
+602,7
@@
static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
return(ret);
}
return(ret);
}
-static long conn_callback_ctrl(BIO *b, int cmd,
void (*fp)()
)
+static long conn_callback_ctrl(BIO *b, int cmd,
bio_info_cb *fp
)
{
long ret=1;
BIO_CONNECT *data;
{
long ret=1;
BIO_CONNECT *data;