diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-16 20:09:01 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-16 20:09:01 +0000 |
commit | 9d774b64948be8b1a3da537a8dc49128847fa99a (patch) | |
tree | 9f94ac78ff38b9bef4824a74db02292a390fb5fb /res/res_features.c | |
parent | 0f3b9d81dd1427c90f9b5c6b6026c5b5957105fc (diff) |
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
Diffstat (limited to 'res/res_features.c')
-rw-r--r-- | res/res_features.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/res/res_features.c b/res/res_features.c index 17e72d606..6c58a98da 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1054,7 +1054,6 @@ static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *call struct ast_channel *chan; struct ast_channel *monitor_chans[2]; struct ast_channel *active_channel; - struct ast_frame *f = NULL; int res = 0, ready = 0; 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(); to = timeout; while (!ast_check_hangup(caller) && timeout && (chan->_state != AST_STATE_UP)) { + struct ast_frame *f = NULL; + monitor_chans[0] = caller; monitor_chans[1] = chan; 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*/ } - if (!active_channel) { + if (!active_channel) continue; - } if (chan && (chan == active_channel)){ 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); - } - } + } /* end while */ } else ast_log(LOG_NOTICE, "Unable to call channel %s/%s\n", type, (char *)data); } 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 */ - if (f && f->frametype == AST_FRAME_DTMF) { + if (f->frametype == AST_FRAME_DTMF) { char *featurecode; int sense; |