remove log output

master
fangdingjun 6 years ago
parent a8f0b8f39b
commit 8895d6a0ec

@ -132,7 +132,7 @@ int handshake(struct session *sess)
printf("cert verify output: %s\n", out.data); printf("cert verify output: %s\n", out.data);
gnutls_free(out.data); gnutls_free(out.data);
} }
fprintf(stderr, "*** Handshake failed: %s\n", gnutls_strerror(ret)); //fprintf(stderr, "*** Handshake failed: %s\n", gnutls_strerror(ret));
} /*else{ } /*else{
desc = gnutls_session_get_desc(sess->session); desc = gnutls_session_get_desc(sess->session);
printf("- Session info: %s\n", desc); printf("- Session info: %s\n", desc);

@ -383,7 +383,7 @@ func onDataReadCallback(d unsafe.Pointer, cbuf *C.char, bufLen C.int) C.int {
buf := make([]byte, int(bufLen)) buf := make([]byte, int(bufLen))
n, err := conn.c.Read(buf) n, err := conn.c.Read(buf)
if err != nil { if err != nil {
log.Println(err) //log.Println(err)
// 0 indicates connection termination // 0 indicates connection termination
return 0 return 0
} }
@ -403,7 +403,7 @@ func onDataWriteCallback(d unsafe.Pointer, cbuf *C.char, bufLen C.int) C.int {
gobuf := C.GoBytes(unsafe.Pointer(cbuf), bufLen) gobuf := C.GoBytes(unsafe.Pointer(cbuf), bufLen)
n, err := conn.c.Write(gobuf) n, err := conn.c.Write(gobuf)
if err != nil { if err != nil {
log.Println(err) //log.Println(err)
return -1 return -1
} }
return C.int(n) return C.int(n)

Loading…
Cancel
Save