|
|
@ -11447,7 +11447,6 @@ restartsearch:
|
|
|
|
/*! \brief Start the channel monitor thread */
|
|
|
|
/*! \brief Start the channel monitor thread */
|
|
|
|
static int restart_monitor(void)
|
|
|
|
static int restart_monitor(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
pthread_attr_t attr;
|
|
|
|
|
|
|
|
/* If we're supposed to be stopped -- stay stopped */
|
|
|
|
/* If we're supposed to be stopped -- stay stopped */
|
|
|
|
if (monitor_thread == AST_PTHREADT_STOP)
|
|
|
|
if (monitor_thread == AST_PTHREADT_STOP)
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
@ -11465,7 +11464,7 @@ static int restart_monitor(void)
|
|
|
|
pthread_kill(monitor_thread, SIGURG);
|
|
|
|
pthread_kill(monitor_thread, SIGURG);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
/* Start a new monitor */
|
|
|
|
/* Start a new monitor */
|
|
|
|
if (ast_pthread_create(&monitor_thread, &attr, do_monitor, NULL) < 0) {
|
|
|
|
if (ast_pthread_create(&monitor_thread, NULL, do_monitor, NULL) < 0) {
|
|
|
|
ast_mutex_unlock(&monlock);
|
|
|
|
ast_mutex_unlock(&monlock);
|
|
|
|
ast_log(LOG_ERROR, "Unable to start monitor thread.\n");
|
|
|
|
ast_log(LOG_ERROR, "Unable to start monitor thread.\n");
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|