Navigation


Changeset 693:16c373df0947 in freeDiameter for libfdproto/init.c


Ignore:
Timestamp:
Jan 21, 2011, 3:12:54 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdproto/init.c

    r687 r693  
    3939pthread_mutex_t fd_cpu_mtx_dummy = PTHREAD_MUTEX_INITIALIZER;
    4040
     41/* function to free the threadnames */
     42static 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
    4151/* Initialize library variables and threads */
    4252int fd_libproto_init()
     
    4555       
    4656        /* 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);
    4858        if (ret != 0) {
    4959                fprintf(stderr, "Error initializing the libfreeDiameter library: %s\n", strerror(ret) );
Note: See TracChangeset for help on using the changeset viewer.