Changeset 693:16c373df0947 in freeDiameter
- Timestamp:
- Jan 21, 2011, 3:12:54 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/core.c
r691 r693 69 69 static void * core_runner_thread(void * arg) 70 70 { 71 fd_log_threadname("Core Runner");72 73 71 if (arg && (*(int *)arg == CORE_MODE_IMMEDIATE)) 74 72 goto end; 73 74 fd_log_threadname("fD Core Runner"); 75 75 76 76 /* Handle events incoming on the main event queue */ … … 131 131 end: 132 132 TRACE_DEBUG(INFO, FD_PROJECT_BINARY " framework is stopping..."); 133 fd_log_threadname("fD Core Shutdown"); 133 134 134 135 /* cleanups */ -
libfdproto/init.c
r687 r693 39 39 pthread_mutex_t fd_cpu_mtx_dummy = PTHREAD_MUTEX_INITIALIZER; 40 40 41 /* function to free the threadnames */ 42 static void freelogstr(void * str) { 43 if (TRACE_BOOL(ANNOYING)) { 44 if (str) { 45 fd_log_debug("(Thread '%s' terminating)\n", (char *)str); 46 } 47 } 48 free(str); 49 } 50 41 51 /* Initialize library variables and threads */ 42 52 int fd_libproto_init() … … 45 55 46 56 /* Create the thread key that contains thread name for debug messages */ 47 ret = pthread_key_create(&fd_log_thname, free );57 ret = pthread_key_create(&fd_log_thname, freelogstr); 48 58 if (ret != 0) { 49 59 fprintf(stderr, "Error initializing the libfreeDiameter library: %s\n", strerror(ret) ); -
tests/tests.h
r689 r693 169 169 } 170 170 171 static inline void test_init(int argc, char * argv[] )171 static inline void test_init(int argc, char * argv[], char *fname) 172 172 { 173 173 memset(fd_g_config, 0, sizeof(struct fd_config)); … … 175 175 CHECK( 0, fd_libproto_init() ); 176 176 177 fd_log_threadname(basename( __FILE__));177 fd_log_threadname(basename(fname)); 178 178 179 179 /* Initialize gcrypt and gnutls */ … … 199 199 return; 200 200 } 201 #define INIT_FD() test_init(argc, argv );201 #define INIT_FD() test_init(argc, argv, __FILE__); 202 202 203 203 #endif /* _TESTS_H */
Note: See TracChangeset
for help on using the changeset viewer.