return -1;
}
if (monitor_thread != AST_PTHREADT_NULL) {
+ /* Wake up the thread */
pthread_kill(monitor_thread, SIGURG);
-#if 0
- pthread_join(monitor_thread, NULL);
-#endif
} else {
/* Start a new monitor */
if (ast_pthread_create(&monitor_thread, NULL, do_monitor, NULL) < 0) {
ast_log(LOG_WARNING, "Unable to lock the interface list\n");
return -1;
}
+ /* Wake up the thread */
pthread_cancel(monitor_thread);
-#if 0
- pthread_join(monitor_thread, NULL);
-#endif
ast_mutex_unlock(&iflock);
}
/* Start a new monitor */
return -1;
}
if (monitor_thread != AST_PTHREADT_NULL) {
- /* Just signal it to be sure it wakes up */
-#if 0
- pthread_cancel(monitor_thread);
-#endif
+ /* Wake up the thread */
pthread_kill(monitor_thread, SIGURG);
-#if 0
- pthread_join(monitor_thread, NULL);
-#endif
} else {
/* Start a new monitor */
if (ast_pthread_create(&monitor_thread, &attr, do_monitor, NULL) < 0) {