| 36 | static pthread_mutex_t trace_lock = PTHREAD_MUTEX_INITIALIZER; |
| 37 | |
| 38 | static void host_node_vprintf(loglvl lvl, host_node_type *host_node_ptr, |
| 39 | int flags, const char *fmt, va_list ap) |
| 40 | { |
| 41 | struct netinfo_struct *netinfo_ptr = host_node_ptr->netinfo_ptr; |
| 42 | |
| 43 | /* While my net changes bed in, I want to see all trace even if in |
| 44 | * "distress" mode. Later perhaps we can redirect this to ctrace. */ |
| 45 | /* |
| 46 | if((flags & NETTRCF_SUPPRESS) && host_node_ptr->distress) |
| 47 | return; |
| 48 | */ |
| 49 | |
| 50 | Pthread_mutex_lock(&trace_lock); |
| 51 | logmsg(lvl, "%p [%s %s%s fd %d] ", (void *)pthread_self(), netinfo_ptr->service, host_node_ptr->host, |
| 52 | host_node_ptr->subnet, host_node_ptr->fd); |
| 53 | logmsgv(lvl, fmt, ap); |
| 54 | Pthread_mutex_unlock(&trace_lock); |
| 55 | } |
| 56 | |
| 57 | void host_node_printf(loglvl lvl, host_node_type *host_node_ptr, const char *fmt, ...) |
| 58 | { |
no test coverage detected