Mercurial > hg > freeDiameter
diff include/freeDiameter/libfdcore.h @ 1159:05f74dc19c49
Include source rev number in version information when available
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Fri, 31 May 2013 11:20:27 +0800 |
parents | d00b5914351e |
children | e8bf101264fa |
line wrap: on
line diff
--- a/include/freeDiameter/libfdcore.h Fri May 31 11:19:35 2013 +0800 +++ b/include/freeDiameter/libfdcore.h Fri May 31 11:20:27 2013 +0800 @@ -60,8 +60,7 @@ #define CHECK_GNUTLS_GEN( faillevel, __call__, __fallback__ ) { \ CHECK_PRELUDE(__call__); \ if (__ret__ < 0) { \ - __ret__ = errno; \ - LOG(faillevel, "ERROR: in '%s' :\t%s", #__call__ , gnutls_strerror(__ret__)); \ + LOG(faillevel, "TLS ERROR: in '%s' :\t%s", #__call__ , gnutls_strerror(__ret__)); \ __fallback__; \ } \ } @@ -75,14 +74,8 @@ #ifndef EXCLUDE_DEPRECATED /* Macro for transition, replace with CHECK_GNUTLS_GEN */ -#define CHECK_GNUTLS_DO( __call__, __fallback__ ) { \ - CHECK_PRELUDE(__call__); \ - if (__ret__ < 0) { \ - __ret__ = errno; \ - TRACE_ERROR("ERROR: in '%s' :\t%s", #__call__ , gnutls_strerror(__ret__)); \ - __fallback__; \ - } \ -} +#define CHECK_GNUTLS_DO( __call__, __fallback__ ) \ + CHECK_GNUTLS_GEN( FD_LOG_ERROR, __call__, __fallback__ ) #endif /* EXCLUDE_DEPRECATED */ @@ -95,8 +88,8 @@ /* Initialize the libfdcore internals. This also initializes libfdproto */ int fd_core_initialize(void); -/* Return a string describing the version of the library */ -const char *fd_core_version(void); +/* A string describing the version of the library */ +extern const char fd_core_version[]; /* Parse the freeDiameter.conf configuration file, load the extensions */ int fd_core_parseconf(const char * conffile);