aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-09 20:08:24 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-09 20:08:24 +0000
commit6b0ad4ad0a55784cf6595423bb12bf0c0dfff4df (patch)
treef2cfc0a9b8aed9ce08a09b5a4d9684432443e487 /pbx
parentdc5ebadba5a435cbc2783e6a28d77e1c6bddd3dc (diff)
Bug 6157 - Memory leak
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7908 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_spool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index 244f7b2f5..a7dbed32c 100644
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -313,8 +313,10 @@ static int scan_service(char *fn, time_t now, time_t atime)
#endif
fclose(f);
if (o->retries <= o->maxretries) {
+ now += o->retrytime;
if (o->callingpid && (o->callingpid == ast_mainpid)) {
safe_append(o, time(NULL), "DelayedRetry");
+ free_outgoing(o);
ast_log(LOG_DEBUG, "Delaying retry since we're currently running '%s'\n", o->fn);
} else {
/* Increment retries */
@@ -327,7 +329,6 @@ static int scan_service(char *fn, time_t now, time_t atime)
safe_append(o, now, "StartRetry");
launch_service(o);
}
- now += o->retrytime;
return now;
} else {
ast_log(LOG_EVENT, "Queued call to %s/%s expired without completion after %d attempt%s\n", o->tech, o->dest, o->retries - 1, ((o->retries - 1) != 1) ? "s" : "");