Navigation


Changeset 214:5a1b93f59f8f in freeDiameter for include


Ignore:
Timestamp:
Feb 18, 2010, 3:20:00 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added trace facility for GNUTLS calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/freeDiameter.h

    r162 r214  
    4747#endif /* GNUTLS_VERSION */
    4848
     49/* GNUTLS calls debug level */
     50#ifndef GNUTLS_DBG_LEVEL
     51#define GNUTLS_DBG_LEVEL ANNOYING
     52#endif /* GNUTLS_DBG_LEVEL */
     53
    4954/* Check the return value of a GNUTLS function, log and propagate */
    5055#define CHECK_GNUTLS_DO( __call__, __fallback__ ) {                                             \
    5156        int __ret__;                                                                            \
    52         TRACE_DEBUG_ALL( "Check FCT: " #__call__ );                                             \
     57        TRACE_DEBUG(GNUTLS_DBG_LEVEL, "GNUTLS call: " #__call__ );                              \
    5358        __ret__ = (__call__);                                                                   \
    5459        if (__ret__ < 0) {                                                                      \
     
    5762        }                                                                                       \
    5863}
     64
     65/* For GNUTLS routines that do not return a value */
     66#define GNUTLS_TRACE( __call__) {                                       \
     67        TRACE_DEBUG(GNUTLS_DBG_LEVEL, "GNUTLS call: " #__call__ );      \
     68        (__call__);                                                     \
     69}
     70
    5971
    6072
Note: See TracChangeset for help on using the changeset viewer.