dect
/
asterisk
Archived
13
0
Fork 0

more formatting cleanup including removal of a useless check

for f == NULL



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20652 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
rizzo 2006-04-16 20:09:01 +00:00
parent 0f3b9d81dd
commit 9d774b6494
1 changed files with 6 additions and 7 deletions

View File

@ -1054,7 +1054,6 @@ static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *call
struct ast_channel *chan; struct ast_channel *chan;
struct ast_channel *monitor_chans[2]; struct ast_channel *monitor_chans[2];
struct ast_channel *active_channel; struct ast_channel *active_channel;
struct ast_frame *f = NULL;
int res = 0, ready = 0; int res = 0, ready = 0;
if ((chan = ast_request(type, format, data, &cause))) { if ((chan = ast_request(type, format, data, &cause))) {
@ -1081,6 +1080,8 @@ static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *call
started = ast_tvnow(); started = ast_tvnow();
to = timeout; to = timeout;
while (!ast_check_hangup(caller) && timeout && (chan->_state != AST_STATE_UP)) { while (!ast_check_hangup(caller) && timeout && (chan->_state != AST_STATE_UP)) {
struct ast_frame *f = NULL;
monitor_chans[0] = caller; monitor_chans[0] = caller;
monitor_chans[1] = chan; monitor_chans[1] = chan;
active_channel = ast_waitfor_n(monitor_chans, 2, &to); active_channel = ast_waitfor_n(monitor_chans, 2, &to);
@ -1092,9 +1093,8 @@ static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *call
break; /*doh! timeout*/ break; /*doh! timeout*/
} }
if (!active_channel) { if (!active_channel)
continue; continue;
}
if (chan && (chan == active_channel)){ if (chan && (chan == active_channel)){
f = ast_read(chan); f = ast_read(chan);
@ -1162,10 +1162,9 @@ static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *call
} }
} }
} }
if (f) { if (f)
ast_frfree(f); ast_frfree(f);
} } /* end while */
}
} else } else
ast_log(LOG_NOTICE, "Unable to call channel %s/%s\n", type, (char *)data); ast_log(LOG_NOTICE, "Unable to call channel %s/%s\n", type, (char *)data);
} else { } else {
@ -1371,7 +1370,7 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
} }
} }
/* check for '*', if we find it it's time to disconnect */ /* check for '*', if we find it it's time to disconnect */
if (f && f->frametype == AST_FRAME_DTMF) { if (f->frametype == AST_FRAME_DTMF) {
char *featurecode; char *featurecode;
int sense; int sense;