]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix a bug where the followme application would continue trying numbers after the...
authorJoshua Colp <jcolp@digium.com>
Tue, 5 May 2009 17:43:30 +0000 (17:43 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 5 May 2009 17:43:30 +0000 (17:43 +0000)
(closes issue #13624)
Reported by: sgenyuk

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@192429 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_followme.c

index 4b6d433fcf1cc2ced21744684d1be6ef5ee9eeaa..ecf178fddc82d116df03d37f8f86c26d521e948f 100644 (file)
@@ -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;