@ -94,10 +94,6 @@ struct stasis_app_control {
* The name of the next Stasis application to move to .
* The name of the next Stasis application to move to .
*/
*/
char * next_app ;
char * next_app ;
/*!
* The thread currently blocking on the channel .
*/
pthread_t control_thread ;
/*!
/*!
* The list of arguments to pass to StasisStart when moving to another app .
* The list of arguments to pass to StasisStart when moving to another app .
*/
*/
@ -162,8 +158,6 @@ struct stasis_app_control *control_create(struct ast_channel *channel, struct st
control - > next_app = NULL ;
control - > next_app = NULL ;
AST_VECTOR_INIT ( & control - > next_app_args , 0 ) ;
AST_VECTOR_INIT ( & control - > next_app_args , 0 ) ;
control_set_thread ( control , AST_PTHREADT_NULL ) ;
return control ;
return control ;
}
}
@ -193,13 +187,6 @@ static void app_control_unregister_rule(
ao2_unlock ( control - > command_queue ) ;
ao2_unlock ( control - > command_queue ) ;
}
}
void control_set_thread ( struct stasis_app_control * control , pthread_t threadid )
{
ao2_lock ( control - > command_queue ) ;
control - > control_thread = threadid ;
ao2_unlock ( control - > command_queue ) ;
}
/*!
/*!
* \ internal
* \ internal
* \ brief Checks to make sure each rule in the given list passes .
* \ brief Checks to make sure each rule in the given list passes .
@ -309,10 +296,10 @@ static struct stasis_app_command *exec_command_on_condition(
ao2_link_flags ( control - > command_queue , command , OBJ_NOLOCK ) ;
ao2_link_flags ( control - > command_queue , command , OBJ_NOLOCK ) ;
ast_cond_signal ( & control - > wait_cond ) ;
ast_cond_signal ( & control - > wait_cond ) ;
if ( control - > c ontrol_thread ! = AST_PTHREADT_NULL ) {
if ( control - > c hannel ) {
/* if the control thread is waiting on the channel, send the SIGURG
/* Queue a null frame so that if and when the channel is waited on,
to let it know there is a new command */
return immediately to process the new command */
pthread_kill( control - > control_thread , SIGURG ) ;
ast_queue_frame( control - > channel , & ast_null_frame ) ;
}
}
ao2_unlock ( control - > command_queue ) ;
ao2_unlock ( control - > command_queue ) ;