From e95a82779cea3bbb29c563b739d22ed016ae014c Mon Sep 17 00:00:00 2001 From: fangdingjun Date: Fri, 6 Jul 2018 11:39:32 +0800 Subject: [PATCH] fix function name --- _gnutls.h | 2 +- gnutls.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_gnutls.h b/_gnutls.h index 462aa63..bea1972 100644 --- a/_gnutls.h +++ b/_gnutls.h @@ -14,7 +14,7 @@ struct session void *data; }; -extern int OnOnDataReadCallbackCallback(void *, char *, int); +extern int OnDataReadCallback(void *, char *, int); extern int OnDataWriteCallback(void *, char *, int); extern int OnDataTimeoutRead(void *, int); diff --git a/gnutls.c b/gnutls.c index 65b2669..d8f4fe4 100644 --- a/gnutls.c +++ b/gnutls.c @@ -92,7 +92,7 @@ int cert_select_callback(gnutls_session_t sess, const gnutls_datum_t *req_ca_dn, ssize_t pull_function(gnutls_transport_ptr_t ptr, void *data, size_t len) { - return OnOnDataReadCallbackCallback(ptr, data, len); + return OnDataReadCallback(ptr, data, len); } int pull_timeout_function(gnutls_transport_ptr_t ptr, unsigned int ms) @@ -417,12 +417,12 @@ gnutls_pcert_st *get_peer_certificate(gnutls_session_t sess, int *pcert_length) raw_certs = gnutls_certificate_get_peers(sess, pcert_length); if (pcert_length == NULL) { - printf("pcert length is NULL\n"); + //printf("pcert length is NULL\n"); return NULL; } if (*pcert_length == 0) { - printf("pcert length is 0\n"); + //printf("pcert length is 0\n"); return NULL; } //printf("pcert length %d\n", *pcert_length);