diff --git a/apps/confbridge/conf_state_multi_marked.c b/apps/confbridge/conf_state_multi_marked.c index 999996144c..6e3ba3e29a 100644 --- a/apps/confbridge/conf_state_multi_marked.c +++ b/apps/confbridge/conf_state_multi_marked.c @@ -85,8 +85,6 @@ static void leave_marked(struct conference_bridge_user *cbu) conf_remove_user_marked(cbu->conference_bridge, cbu); if (cbu->conference_bridge->markedusers == 0) { - need_prompt = 1; - AST_LIST_TRAVERSE_SAFE_BEGIN(&cbu->conference_bridge->active_list, cbu_iter, list) { /* Kick ENDMARKED cbu_iters */ if (ast_test_flag(&cbu_iter->u_profile, USER_OPT_ENDMARKED) && !cbu_iter->kicked) { @@ -101,6 +99,8 @@ static void leave_marked(struct conference_bridge_user *cbu) ast_bridge_remove(cbu_iter->conference_bridge->bridge, cbu_iter->chan); } else if (ast_test_flag(&cbu_iter->u_profile, USER_OPT_WAITMARKED) && !ast_test_flag(&cbu_iter->u_profile, USER_OPT_MARKEDUSER)) { + need_prompt = 1; + AST_LIST_REMOVE_CURRENT(list); cbu_iter->conference_bridge->activeusers--; AST_LIST_INSERT_TAIL(&cbu_iter->conference_bridge->waiting_list, cbu_iter, list);