whitespace fixes only.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Michiel van Baak
2008-02-09 11:27:10 +00:00
parent 9d4d240b94
commit 4dccb58fb7
17 changed files with 409 additions and 417 deletions

View File

@@ -71,7 +71,8 @@ enum {
AST_APP_OPTIONS(cpb_opts, BEGIN_OPTIONS AST_APP_OPTIONS(cpb_opts, BEGIN_OPTIONS
AST_APP_OPTION_ARG('o', OPT_OFFSET, OPT_ARG_OFFSET), AST_APP_OPTION_ARG('o', OPT_OFFSET, OPT_ARG_OFFSET),
END_OPTIONS ); END_OPTIONS
);
static int is_on_phonepad(char key) static int is_on_phonepad(char key)
{ {

View File

@@ -812,7 +812,6 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
if (ast_channel_sendhtml(outgoing->chan, f->subclass, f->data, f->datalen) == -1) if (ast_channel_sendhtml(outgoing->chan, f->subclass, f->data, f->datalen) == -1)
ast_log(LOG_WARNING, "Unable to send URL\n"); ast_log(LOG_WARNING, "Unable to send URL\n");
if (single && ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_DTMF_BEGIN) || (f->frametype == AST_FRAME_DTMF_END))) { if (single && ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_DTMF_BEGIN) || (f->frametype == AST_FRAME_DTMF_END))) {
if (ast_write(outgoing->chan, f)) if (ast_write(outgoing->chan, f))
ast_log(LOG_WARNING, "Unable to forward voice or dtmf\n"); ast_log(LOG_WARNING, "Unable to forward voice or dtmf\n");
@@ -828,30 +827,26 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
} }
if (!*to) if (!*to)
ast_verb(3, "Nobody picked up in %d ms\n", orig); ast_verb(3, "Nobody picked up in %d ms\n", orig);
if (!*to || ast_check_hangup(in)) { if (!*to || ast_check_hangup(in))
ast_cdr_noanswer(in->cdr); ast_cdr_noanswer(in->cdr);
} }
}
if (peer && !ast_cdr_log_unanswered()) { if (peer && !ast_cdr_log_unanswered()) {
/* suppress the CDR's that didn't win */ /* suppress the CDR's that didn't win */
struct chanlist *o; struct chanlist *o;
for (o = outgoing; o; o = o->next) { for (o = outgoing; o; o = o->next) {
struct ast_channel *c = o->chan; struct ast_channel *c = o->chan;
if (c && c != peer && c->cdr) { if (c && c != peer && c->cdr)
ast_set_flag(c->cdr, AST_CDR_FLAG_POST_DISABLED); ast_set_flag(c->cdr, AST_CDR_FLAG_POST_DISABLED);
} }
}
} else if (!peer && !ast_cdr_log_unanswered()) { } else if (!peer && !ast_cdr_log_unanswered()) {
/* suppress the CDR's that didn't win */ /* suppress the CDR's that didn't win */
struct chanlist *o; struct chanlist *o;
for (o = outgoing; o; o = o->next) { for (o = outgoing; o; o = o->next) {
struct ast_channel *c = o->chan; struct ast_channel *c = o->chan;
if (c && c->cdr) { if (c && c->cdr)
ast_set_flag(c->cdr, AST_CDR_FLAG_POST_DISABLED); ast_set_flag(c->cdr, AST_CDR_FLAG_POST_DISABLED);
} }
} }
}
#ifdef HAVE_EPOLL #ifdef HAVE_EPOLL
for (epollo = outgoing; epollo; epollo = epollo->next) { for (epollo = outgoing; epollo; epollo = epollo->next) {
@@ -870,7 +865,6 @@ static void replace_macro_delimiter(char *s)
*s = ','; *s = ',';
} }
/* returns true if there is a valid privacy reply */ /* returns true if there is a valid privacy reply */
static int valid_priv_reply(struct ast_flags64 *opts, int res) static int valid_priv_reply(struct ast_flags64 *opts, int res)
{ {
@@ -1842,7 +1836,6 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time)); snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast); pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast);
if (ast_test_flag64(&opts, OPT_PEER_H)) { if (ast_test_flag64(&opts, OPT_PEER_H)) {
ast_log(LOG_NOTICE, "PEER context: %s; PEER exten: %s; PEER priority: %d\n", ast_log(LOG_NOTICE, "PEER context: %s; PEER exten: %s; PEER priority: %d\n",
peer->context, peer->exten, peer->priority); peer->context, peer->exten, peer->priority);
@@ -1858,9 +1851,9 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
autoloopflag = ast_test_flag(peer, AST_FLAG_IN_AUTOLOOP); /* save value to restore at the end */ autoloopflag = ast_test_flag(peer, AST_FLAG_IN_AUTOLOOP); /* save value to restore at the end */
ast_set_flag(peer, AST_FLAG_IN_AUTOLOOP); ast_set_flag(peer, AST_FLAG_IN_AUTOLOOP);
while ((res = ast_spawn_extension(peer, peer->context, peer->exten, peer->priority, peer->cid.cid_num, &found, 1))) { while ((res = ast_spawn_extension(peer, peer->context, peer->exten, peer->priority, peer->cid.cid_num, &found, 1)))
peer->priority++; peer->priority++;
}
if (found && res) { if (found && res) {
/* Something bad happened, or a hangup has been requested. */ /* Something bad happened, or a hangup has been requested. */
ast_debug(1, "Spawn extension (%s,%s,%d) exited non-zero on '%s'\n", peer->context, peer->exten, peer->priority, peer->name); ast_debug(1, "Spawn extension (%s,%s,%d) exited non-zero on '%s'\n", peer->context, peer->exten, peer->priority, peer->name);
@@ -1928,9 +1921,8 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
parse = ast_strdupa(data); parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse); AST_STANDARD_APP_ARGS(args, parse);
if ((sleep = atoi(args.sleep))) { if ((sleep = atoi(args.sleep)))
sleep *= 1000; sleep *= 1000;
}
loops = atoi(args.retries); loops = atoi(args.retries);
@@ -2019,8 +2011,7 @@ static int unload_module(void)
res = ast_unregister_application(app); res = ast_unregister_application(app);
res |= ast_unregister_application(rapp); res |= ast_unregister_application(rapp);
if ((con = ast_context_find("app_dial_gosub_virtual_context"))) if ((con = ast_context_find("app_dial_gosub_virtual_context"))) {
{
ast_context_remove_extension2(con, "s", 1, NULL); ast_context_remove_extension2(con, "s", 1, NULL);
ast_context_destroy(con, "app_dial"); /* leave nothing behind */ ast_context_destroy(con, "app_dial"); /* leave nothing behind */
} }