[asterisk-commits] trunk r20652 - /trunk/res/res_features.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Apr 16 13:09:03 MST 2006
Author: rizzo
Date: Sun Apr 16 15:09:01 2006
New Revision: 20652
URL: http://svn.digium.com/view/asterisk?rev=20652&view=rev
Log:
more formatting cleanup including removal of a useless check
for f == NULL
Modified:
trunk/res/res_features.c
Modified: trunk/res/res_features.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_features.c?rev=20652&r1=20651&r2=20652&view=diff
==============================================================================
--- trunk/res/res_features.c (original)
+++ trunk/res/res_features.c Sun Apr 16 15:09:01 2006
@@ -1054,7 +1054,6 @@
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 @@
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 @@
break; /*doh! timeout*/
}
- if (!active_channel) {
+ if (!active_channel)
continue;
- }
if (chan && (chan == active_channel)){
f = ast_read(chan);
@@ -1162,10 +1162,9 @@
}
}
}
- 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 @@
}
}
/* 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;
More information about the asterisk-commits
mailing list