/*! \brief Helper function that does the beginning dialing per dial structure */ static int begin_dial(struct ast_dial *dial, struct ast_channel *chan) { struct ast_dial_channel *channel = NULL; int success = 0; /* Iterate through channel list, requesting and calling each one */ AST_LIST_LOCK(&dial->channels); AST_LIST_TRAVERSE(&dial->channels, channel, list) { success += begin_dial_channel(channel, chan); } /* If number of failures matches the number of channels, then this truly failed */ return success; }