From: Joshua Colp Date: Tue, 5 May 2009 17:43:30 +0000 (+0000) Subject: Fix a bug where the followme application would continue trying numbers after the... X-Git-Tag: 1.4.25-rc1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b15b327834b356c062b0f458dba4491eb73936d;p=thirdparty%2Fasterisk.git Fix a bug where the followme application would continue trying numbers after the caller hung up. (closes issue #13624) Reported by: sgenyuk git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@192429 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_followme.c b/apps/app_followme.c index 4b6d433fcf..ecf178fddc 100644 --- a/apps/app_followme.c +++ b/apps/app_followme.c @@ -874,22 +874,22 @@ static void findmeexec(struct fm_args *tpargs) status = 0; if (!AST_LIST_EMPTY(findme_user_list)) winner = wait_for_winner(findme_user_list, nm, caller, tpargs->namerecloc, &status, tpargs); - - + AST_LIST_TRAVERSE_SAFE_BEGIN(findme_user_list, fmuser, entry) { if (!fmuser->cleared && fmuser->ochan != winner) clear_caller(fmuser); AST_LIST_REMOVE_CURRENT(findme_user_list, entry); free(fmuser); } - AST_LIST_TRAVERSE_SAFE_END + AST_LIST_TRAVERSE_SAFE_END; + fmuser = NULL; tmpuser = NULL; headuser = NULL; if (winner) break; - if (!caller) { + if (!caller || ast_check_hangup(caller)) { tpargs->status = 1; free(findme_user_list); return;