# HG changeset patch # User Sebastien Decugis # Date 1371546344 -28800 # Node ID 5d0d300a7cd9626a176b27f74d7255b42b24992f # Parent 940713a4f29623b59129f8b0d6306b16aef45b67 Add more traces for debug diff -r 940713a4f296 -r 5d0d300a7cd9 libfdcore/sctp_dtls.c --- a/libfdcore/sctp_dtls.c Tue Jun 18 16:28:11 2013 +0800 +++ b/libfdcore/sctp_dtls.c Tue Jun 18 17:05:44 2013 +0800 @@ -143,8 +143,8 @@ switch (event) { case FDEVP_CNX_MSG_RECV: got_data = 1; - LOG_A("Received DTLS data, type %hhd, Seq %02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx, Stream %hu", - (*buf)[0], + LOG_A("Received DTLS data, len %zd, type %hhd, Seq %02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx, Stream %hu", + *len, (*buf)[0], (*buf)[3],(*buf)[4],(*buf)[5],(*buf)[6], (*buf)[7],(*buf)[8],(*buf)[9],(*buf)[10], *strid); break; @@ -176,9 +176,9 @@ while (offset + 13 <= len) { next_record_len = (buf[offset+11] << 8) + buf[offset+12]; - LOG_A("update_nextseq_from_records off:%zd Type %hhd, Ver:%02hhx.%02hhx, Seq:%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx", + LOG_A("update_nextseq_from_records off:%zd Type %hhd, Ver:%02hhx.%02hhx, Len:%d, Seq:%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx", offset, - buf[offset], buf[offset+1], buf[offset+2], + buf[offset], buf[offset+1], buf[offset+2], (((int)buf[offset+11])<<8)+((int)buf[offset+12]), buf[offset+3],buf[offset+4],buf[offset+5],buf[offset+6],buf[offset+7],buf[offset+8],buf[offset+9],buf[offset+10] ); @@ -606,9 +606,9 @@ /* TODO("Cookie exchange?"); */ /* gnutls_dtls_prestate_set (session, &prestate); */ - gnutls_dtls_set_mtu(session, DTLS_SCTP_MTU); + GNUTLS_TRACE( gnutls_dtls_set_mtu(session, DTLS_SCTP_MTU)); - gnutls_dtls_set_timeouts(session, 70000, 60000); /* Set retrans > total so that there is no retransmission, since SCTP is reliable */ + GNUTLS_TRACE( gnutls_dtls_set_timeouts(session, 70000, 60000)); /* Set retrans > total so that there is no retransmission, since SCTP is reliable */ #ifdef GNUTLS_VERSION_320 TODO("Disable replay protection");