aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-16 19:12:51 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-16 19:12:51 +0000
commitce29951c27ab965432e3618aa407841bc12f53a7 (patch)
tree97fcd640692f9470cd0e56c0d86813da34ebea1b /res
parentc06844cf06c551653f798cc4ce5317b582b0e476 (diff)
properly reindent a large block.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20624 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_features.c97
1 files changed, 48 insertions, 49 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 90d4a88b4..11ab6ebe3 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -1528,57 +1528,56 @@ static void *do_parking_thread(void *ignore)
if (pu->chan->fds[x] < 0 || (!FD_ISSET(pu->chan->fds[x], &rfds) && !FD_ISSET(pu->chan->fds[x], &efds)))
continue;
- /* XXX reindent next block */
- if (FD_ISSET(pu->chan->fds[x], &efds))
- ast_set_flag(pu->chan, AST_FLAG_EXCEPTION);
- else
- ast_clear_flag(pu->chan, AST_FLAG_EXCEPTION);
- pu->chan->fdno = x;
- /* See if they need servicing */
- f = ast_read(pu->chan);
- if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
- if (f)
- ast_frfree(f);
- manager_event(EVENT_FLAG_CALL, "ParkedCallGiveUp",
- "Exten: %d\r\n"
- "Channel: %s\r\n"
- "CallerID: %s\r\n"
- "CallerIDName: %s\r\n"
- ,pu->parkingnum, pu->chan->name
- ,(pu->chan->cid.cid_num ? pu->chan->cid.cid_num : "<unknown>")
- ,(pu->chan->cid.cid_name ? pu->chan->cid.cid_name : "<unknown>")
- );
-
- /* There's a problem, hang them up*/
- if (option_verbose > 1)
- ast_verbose(VERBOSE_PREFIX_2 "%s got tired of being parked\n", pu->chan->name);
- ast_hangup(pu->chan);
- /* And take them out of the parking lot */
- if (pl)
- pl->next = pu->next;
- else
- parkinglot = pu->next;
- pt = pu;
- pu = pu->next;
- con = ast_context_find(parking_con);
- if (con) {
- snprintf(exten, sizeof(exten), "%d", pt->parkingnum);
- if (ast_context_remove_extension2(con, exten, 1, NULL))
- ast_log(LOG_WARNING, "Whoa, failed to remove the extension!\n");
- } else
- ast_log(LOG_WARNING, "Whoa, no parking context?\n");
- free(pt);
- break;
- } else {
- /* XXX Maybe we could do something with packets, like dial "0" for operator or something XXX */
+ if (FD_ISSET(pu->chan->fds[x], &efds))
+ ast_set_flag(pu->chan, AST_FLAG_EXCEPTION);
+ else
+ ast_clear_flag(pu->chan, AST_FLAG_EXCEPTION);
+ pu->chan->fdno = x;
+ /* See if they need servicing */
+ f = ast_read(pu->chan);
+ if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
+ if (f)
ast_frfree(f);
- if (pu->moh_trys < 3 && !pu->chan->generatordata) {
- ast_log(LOG_DEBUG, "MOH on parked call stopped by outside source. Restarting.\n");
- ast_moh_start(pu->chan, NULL);
- pu->moh_trys++;
- }
- goto std; /* XXX Ick: jumping into an else statement??? XXX */
+ manager_event(EVENT_FLAG_CALL, "ParkedCallGiveUp",
+ "Exten: %d\r\n"
+ "Channel: %s\r\n"
+ "CallerID: %s\r\n"
+ "CallerIDName: %s\r\n"
+ ,pu->parkingnum, pu->chan->name
+ ,(pu->chan->cid.cid_num ? pu->chan->cid.cid_num : "<unknown>")
+ ,(pu->chan->cid.cid_name ? pu->chan->cid.cid_name : "<unknown>")
+ );
+
+ /* There's a problem, hang them up*/
+ if (option_verbose > 1)
+ ast_verbose(VERBOSE_PREFIX_2 "%s got tired of being parked\n", pu->chan->name);
+ ast_hangup(pu->chan);
+ /* And take them out of the parking lot */
+ if (pl)
+ pl->next = pu->next;
+ else
+ parkinglot = pu->next;
+ pt = pu;
+ pu = pu->next;
+ con = ast_context_find(parking_con);
+ if (con) {
+ snprintf(exten, sizeof(exten), "%d", pt->parkingnum);
+ if (ast_context_remove_extension2(con, exten, 1, NULL))
+ ast_log(LOG_WARNING, "Whoa, failed to remove the extension!\n");
+ } else
+ ast_log(LOG_WARNING, "Whoa, no parking context?\n");
+ free(pt);
+ break;
+ } else {
+ /* XXX Maybe we could do something with packets, like dial "0" for operator or something XXX */
+ ast_frfree(f);
+ if (pu->moh_trys < 3 && !pu->chan->generatordata) {
+ ast_log(LOG_DEBUG, "MOH on parked call stopped by outside source. Restarting.\n");
+ ast_moh_start(pu->chan, NULL);
+ pu->moh_trys++;
}
+ goto std; /* XXX Ick: jumping into an else statement??? XXX */
+ }
} /* end for */
if (x >= AST_MAX_FDS) {