# HG changeset patch # User Sebastien Decugis # Date 1265268175 -32400 # Node ID 960764fbc68fb2f235ef08752595d1552d7830e6 # Parent 9ed2e3ce44345088552ee4042a80ce3516e5e78b Fix compilation error diff -r 9ed2e3ce4434 -r 960764fbc68f include/freeDiameter/libfreeDiameter.h --- a/include/freeDiameter/libfreeDiameter.h Thu Feb 04 16:19:52 2010 +0900 +++ b/include/freeDiameter/libfreeDiameter.h Thu Feb 04 16:22:55 2010 +0900 @@ -189,7 +189,8 @@ /* Helper for debugging by adding traces -- for debuging a specific location of the code */ #define TRACE_HERE() \ - TRACE_DEBUG(NONE, " -- debug checkpoint -- "); + TRACE_DEBUG(NONE, " -- debug checkpoint %d -- ", fd_breakhere()); +int fd_breakhere(void); /* Helper for tracing the CHECK_* macros bellow -- very very verbose code execution! */ #define TRACE_DEBUG_ALL( str ) \ @@ -477,7 +478,6 @@ /* Terminate a thread */ static __inline__ int fd_thr_term(pthread_t * th) { - int ret = 0; void * th_ret = NULL; CHECK_PARAMS(th); @@ -490,7 +490,7 @@ (void) pthread_cancel(*th); /* Then join the thread */ - CHECK_POSIX_DO( ret = pthread_join(*th, &th_ret), /* continue */ ); + CHECK_POSIX( pthread_join(*th, &th_ret) ); if (th_ret == PTHREAD_CANCELED) { TRACE_DEBUG(ANNOYING, "The thread %p was canceled", *th); @@ -501,7 +501,7 @@ /* Clean the location */ *th = (pthread_t)NULL; - return ret; + return 0; } /* Cleanups for cancellation (all threads should be safely cancelable...) */ diff -r 9ed2e3ce4434 -r 960764fbc68f libfreeDiameter/log.c --- a/libfreeDiameter/log.c Thu Feb 04 16:19:52 2010 +0900 +++ b/libfreeDiameter/log.c Thu Feb 04 16:22:55 2010 +0900 @@ -45,6 +45,9 @@ char * fd_debug_one_function = NULL; char * fd_debug_one_file = NULL; +/* Useless function, only to ease setting up a breakpoint in gdb (break fd_breakhere) -- use TRACE_HERE */ +int fd_breaks = 0; +int fd_breakhere(void) { return ++fd_breaks; } /* Log a debug message */ void fd_log_debug ( char * format, ... )