Mercurial > hg > freeDiameter
comparison libfdcore/p_expiry.c @ 1190:6a1042d8075b
Replace FDEV_TERMINATE events with calls to fd_core_shutdown to handle the core state properly
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Mon, 10 Jun 2013 16:44:18 +0800 |
parents | 4a9f08d6b6ba |
children | f937feb72734 |
comparison
equal
deleted
inserted
replaced
1189:50bf33dc8fe0 | 1190:6a1042d8075b |
---|---|
84 } while (1); | 84 } while (1); |
85 | 85 |
86 error: | 86 error: |
87 TRACE_DEBUG(INFO, "An error occurred in peers module! GC thread is terminating..."); | 87 TRACE_DEBUG(INFO, "An error occurred in peers module! GC thread is terminating..."); |
88 ASSERT(0); | 88 ASSERT(0); |
89 CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_TERMINATE, 0, NULL), ); | 89 CHECK_FCT_DO(fd_core_shutdown(), ); |
90 return NULL; | 90 return NULL; |
91 } | 91 } |
92 | 92 |
93 | 93 |
94 static void * exp_th_fct(void * arg) | 94 static void * exp_th_fct(void * arg) |
136 } while (1); | 136 } while (1); |
137 | 137 |
138 pthread_cleanup_pop( 1 ); | 138 pthread_cleanup_pop( 1 ); |
139 | 139 |
140 TRACE_DEBUG(INFO, "An error occurred in peers module! Expiry thread is terminating..."); | 140 TRACE_DEBUG(INFO, "An error occurred in peers module! Expiry thread is terminating..."); |
141 CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_TERMINATE, 0, NULL), ); | 141 CHECK_FCT_DO(fd_core_shutdown(), ); |
142 return NULL; | 142 return NULL; |
143 } | 143 } |
144 | 144 |
145 /* Initialize peers expiry mechanism */ | 145 /* Initialize peers expiry mechanism */ |
146 int fd_p_expi_init(void) | 146 int fd_p_expi_init(void) |