~ubuntu-branches/ubuntu/intrepid/asterisk/intrepid-updates

« back to all changes in this revision

Viewing changes to main/dial.c

  • Committer: Bazaar Package Importer
  • Author(s): Tzafrir Cohen
  • Date: 2008-01-03 15:14:23 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: james.westby@ubuntu.com-20080103151423-l6rcba9dbhc8nfc4
Tags: 1:1.4.17~dfsg-2
Allow building vs. libc-client2007 (Closes: #458877).

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
#include "asterisk.h"
27
27
 
28
 
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 89610 $")
 
28
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 94468 $")
29
29
 
30
30
#include <stdio.h>
31
31
#include <stdlib.h>
681
681
                return -1;
682
682
        
683
683
        /* Hangup and deallocate all the dialed channels */
684
 
        AST_LIST_TRAVERSE(&dial->channels, channel, list) {
 
684
        AST_LIST_TRAVERSE_SAFE_BEGIN(&dial->channels, channel, list) {
685
685
                /* Disable any enabled options */
686
686
                for (i = 0; i < AST_DIAL_OPTION_MAX; i++) {
687
687
                        if (!channel->options[i])
696
696
                        channel->owner = NULL;
697
697
                }
698
698
                /* Free structure */
 
699
                AST_LIST_REMOVE_CURRENT(&dial->channels, list);
699
700
                free(channel);
700
701
        }
 
702
        AST_LIST_TRAVERSE_SAFE_END;
701
703
       
702
704
        /* Disable any enabled options globally */
703
705
        for (i = 0; i < AST_DIAL_OPTION_MAX; i++) {