/* crypto/bio/bio_cb.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
#include <string.h>
#include <stdlib.h>
#include "cryptlib.h"
-#include "bio.h"
-#include "err.h"
+#include <openssl/bio.h>
+#include <openssl/err.h>
-long MS_CALLBACK BIO_debug_callback(bio,cmd,argp,argi,argl,ret)
-BIO *bio;
-int cmd;
-char *argp;
-int argi;
-long argl;
-long ret;
+long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp,
+ int argi, long argl, long ret)
{
BIO *b;
MS_STATIC char buf[256];
sprintf(p,"Free - %s\n",bio->method->name);
break;
case BIO_CB_READ:
- sprintf(p,"read(%d,%d) - %s\n",bio->num,argi,bio->method->name);
+ if (bio->method->type & BIO_TYPE_DESCRIPTOR)
+ sprintf(p,"read(%d,%d) - %s fd=%d\n",bio->num,argi,bio->method->name,bio->num);
+ else
+ sprintf(p,"read(%d,%d) - %s\n",bio->num,argi,bio->method->name);
break;
case BIO_CB_WRITE:
- sprintf(p,"write(%d,%d) - %s\n",bio->num,argi,bio->method->name);
+ if (bio->method->type & BIO_TYPE_DESCRIPTOR)
+ sprintf(p,"write(%d,%d) - %s fd=%d\n",bio->num,argi,bio->method->name,bio->num);
+ else
+ sprintf(p,"write(%d,%d) - %s\n",bio->num,argi,bio->method->name);
break;
case BIO_CB_PUTS:
sprintf(p,"puts() - %s\n",bio->method->name);
b=(BIO *)bio->cb_arg;
if (b != NULL)
BIO_write(b,buf,strlen(buf));
-#ifndef WIN16
+#if !defined(NO_STDIO) && !defined(WIN16)
else
fputs(buf,stderr);
#endif