diff options
author | Ben Laurie <ben@openssl.org> | 2002-01-12 15:56:13 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2002-01-12 15:56:13 +0000 |
commit | 45d87a1ffe45b668cb6a6645bdc3e21a69324a41 (patch) | |
tree | 8ae8409ca34138234bd53020665619e80b60273f /crypto/bio | |
parent | a3feb21bbe14539160bdf66a520d669b8dff79f6 (diff) |
Prototype info function.
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/bio.h | 5 | ||||
-rw-r--r-- | crypto/bio/bss_conn.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/crypto/bio/bio.h b/crypto/bio/bio.h index 379cd58324..c687e8c28c 100644 --- a/crypto/bio/bio.h +++ b/crypto/bio/bio.h @@ -467,8 +467,9 @@ int BIO_read_filename(BIO *b,const char *name); size_t BIO_ctrl_pending(BIO *b); size_t BIO_ctrl_wpending(BIO *b); #define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL) -#define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0,(bio_info_cb **)(cbp)) -#define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,(bio_info_cb *)(cb)) +#define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \ + cbp) +#define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb) /* For the BIO_f_buffer() type */ #define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL) diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index c41ba3cc41..177e566f7a 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -95,7 +95,7 @@ typedef struct bio_connect_st /* called when the connection is initially made * callback(BIO,state,ret); The callback should return * 'ret'. state is for compatibility with the ssl info_callback */ - int (*info_callback)(); + int (*info_callback)(const BIO *bio,int state,int ret); } BIO_CONNECT; static int conn_write(BIO *h, const char *buf, int num); @@ -574,7 +574,8 @@ 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); - (void)BIO_set_info_callback(dbio,data->info_callback); + /* FIXME: the cast of the function seems unlikely to be a good idea */ + (void)BIO_set_info_callback(dbio,(bio_info_cb *)data->info_callback); } break; case BIO_CTRL_SET_CALLBACK: |