aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-15 15:07:16 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-15 15:07:16 +0000
commit2bfcfd766203605a20e87acfa55567329c02e303 (patch)
treea4b1089730eac5a52ff59b1af11d804d28451f89
parent223ce289ccdbc76a182e932f81c0045187dd2480 (diff)
Ensure that when a hangup occurs in autoservice, that a hangup frame gets
properly deferred to be read from the channel owner when it gets taken out of autoservice. (closes issue #12874) Reported by: dimas Patches: v1-12874.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138027 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/autoservice.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/main/autoservice.c b/main/autoservice.c
index a681b0f1d..d3879b2c5 100644
--- a/main/autoservice.c
+++ b/main/autoservice.c
@@ -157,14 +157,7 @@ static void *autoservice_run(void *ign)
}
}
- if (!defer_frame) {
- if (f) {
- ast_frfree(f);
- }
- continue;
- }
-
- if (f) {
+ if (defer_frame) {
for (i = 0; i < x; i++) {
struct ast_frame *dup_f;
@@ -172,12 +165,15 @@ static void *autoservice_run(void *ign)
continue;
}
- if ((dup_f = ast_frdup(f))) {
+ if ((dup_f = ast_frdup(defer_frame))) {
AST_LIST_INSERT_TAIL(&ents[i]->deferred_frames, dup_f, frame_list);
}
break;
}
+ }
+
+ if (f) {
ast_frfree(f);
}
}