| OLD | NEW |
| 1 /* crypto/bio/bio_cb.c */ | 1 /* crypto/bio/bio_cb.c */ |
| 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
| 6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
| 7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
| 8 * | 8 * |
| 9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
| 10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 BIO_snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio); | 78 BIO_snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio); |
| 79 p= &(buf[14]); | 79 p= &(buf[14]); |
| 80 p_maxlen = sizeof buf - 14; | 80 p_maxlen = sizeof buf - 14; |
| 81 switch (cmd) | 81 switch (cmd) |
| 82 { | 82 { |
| 83 case BIO_CB_FREE: | 83 case BIO_CB_FREE: |
| 84 BIO_snprintf(p,p_maxlen,"Free - %s\n",bio->method->name); | 84 BIO_snprintf(p,p_maxlen,"Free - %s\n",bio->method->name); |
| 85 break; | 85 break; |
| 86 case BIO_CB_READ: | 86 case BIO_CB_READ: |
| 87 if (bio->method->type & BIO_TYPE_DESCRIPTOR) | 87 if (bio->method->type & BIO_TYPE_DESCRIPTOR) |
| 88 » » » BIO_snprintf(p,p_maxlen,"read(%d,%d) - %s fd=%d\n", | 88 » » » BIO_snprintf(p,p_maxlen,"read(%d,%lu) - %s fd=%d\n", |
| 89 » » » » bio->num,argi,bio->method->name,bio->num); | 89 » » » » bio->num,(unsigned long)argi, |
| 90 » » » » bio->method->name,bio->num); |
| 90 else | 91 else |
| 91 » » » BIO_snprintf(p,p_maxlen,"read(%d,%d) - %s\n", | 92 » » » BIO_snprintf(p,p_maxlen,"read(%d,%lu) - %s\n", |
| 92 » » » » bio->num,argi,bio->method->name); | 93 » » » » bio->num,(unsigned long)argi, |
| 94 » » » » bio->method->name); |
| 93 break; | 95 break; |
| 94 case BIO_CB_WRITE: | 96 case BIO_CB_WRITE: |
| 95 if (bio->method->type & BIO_TYPE_DESCRIPTOR) | 97 if (bio->method->type & BIO_TYPE_DESCRIPTOR) |
| 96 » » » BIO_snprintf(p,p_maxlen,"write(%d,%d) - %s fd=%d\n", | 98 » » » BIO_snprintf(p,p_maxlen,"write(%d,%lu) - %s fd=%d\n", |
| 97 » » » » bio->num,argi,bio->method->name,bio->num); | 99 » » » » bio->num,(unsigned long)argi, |
| 100 » » » » bio->method->name,bio->num); |
| 98 else | 101 else |
| 99 » » » BIO_snprintf(p,p_maxlen,"write(%d,%d) - %s\n", | 102 » » » BIO_snprintf(p,p_maxlen,"write(%d,%lu) - %s\n", |
| 100 » » » » bio->num,argi,bio->method->name); | 103 » » » » bio->num,(unsigned long)argi, |
| 104 » » » » bio->method->name); |
| 101 break; | 105 break; |
| 102 case BIO_CB_PUTS: | 106 case BIO_CB_PUTS: |
| 103 BIO_snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name); | 107 BIO_snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name); |
| 104 break; | 108 break; |
| 105 case BIO_CB_GETS: | 109 case BIO_CB_GETS: |
| 106 » » BIO_snprintf(p,p_maxlen,"gets(%d) - %s\n",argi,bio->method->name
); | 110 » » BIO_snprintf(p,p_maxlen,"gets(%lu) - %s\n",(unsigned long)argi,b
io->method->name); |
| 107 break; | 111 break; |
| 108 case BIO_CB_CTRL: | 112 case BIO_CB_CTRL: |
| 109 » » BIO_snprintf(p,p_maxlen,"ctrl(%d) - %s\n",argi,bio->method->name
); | 113 » » BIO_snprintf(p,p_maxlen,"ctrl(%lu) - %s\n",(unsigned long)argi,b
io->method->name); |
| 110 break; | 114 break; |
| 111 case BIO_CB_RETURN|BIO_CB_READ: | 115 case BIO_CB_RETURN|BIO_CB_READ: |
| 112 BIO_snprintf(p,p_maxlen,"read return %ld\n",ret); | 116 BIO_snprintf(p,p_maxlen,"read return %ld\n",ret); |
| 113 break; | 117 break; |
| 114 case BIO_CB_RETURN|BIO_CB_WRITE: | 118 case BIO_CB_RETURN|BIO_CB_WRITE: |
| 115 BIO_snprintf(p,p_maxlen,"write return %ld\n",ret); | 119 BIO_snprintf(p,p_maxlen,"write return %ld\n",ret); |
| 116 break; | 120 break; |
| 117 case BIO_CB_RETURN|BIO_CB_GETS: | 121 case BIO_CB_RETURN|BIO_CB_GETS: |
| 118 BIO_snprintf(p,p_maxlen,"gets return %ld\n",ret); | 122 BIO_snprintf(p,p_maxlen,"gets return %ld\n",ret); |
| 119 break; | 123 break; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 130 | 134 |
| 131 b=(BIO *)bio->cb_arg; | 135 b=(BIO *)bio->cb_arg; |
| 132 if (b != NULL) | 136 if (b != NULL) |
| 133 BIO_write(b,buf,strlen(buf)); | 137 BIO_write(b,buf,strlen(buf)); |
| 134 #if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16) | 138 #if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16) |
| 135 else | 139 else |
| 136 fputs(buf,stderr); | 140 fputs(buf,stderr); |
| 137 #endif | 141 #endif |
| 138 return(r); | 142 return(r); |
| 139 } | 143 } |
| OLD | NEW |