diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-05 17:43:30 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-05 17:43:30 +0000 |
commit | 9f77ea477c89d06f678b2710b2ef84235223e0af (patch) | |
tree | 5efab92b8e1caf6f2e3a557e82a1ba4ac19785da /apps/app_followme.c | |
parent | 54217acf4741a106c7f7795fb3110afc388861d9 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@192429 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_followme.c')
-rw-r--r-- | apps/app_followme.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_followme.c b/apps/app_followme.c index 4b6d433fc..ecf178fdd 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; |