#! /bin/sh /usr/share/dpatch/dpatch-run ## pbxspool_leak_fix.dpatch by Tzafrir Cohen ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fixes a small memory leak. @DPATCH@ diff -urNad asterisk-1.0.10.dfsg.1/pbx/pbx_spool.c /tmp/dpep.9Qd0Xy/asterisk-1.0.10.dfsg.1/pbx/pbx_spool.c --- asterisk-1.0.10.dfsg.1/pbx/pbx_spool.c 2005-12-14 15:30:57.144206015 +0200 +++ /tmp/dpep.9Qd0Xy/asterisk-1.0.10.dfsg.1/pbx/pbx_spool.c 2005-12-14 15:36:22.689293593 +0200 @@ -271,9 +272,11 @@ #endif fclose(f); if (o->retries <= o->maxretries) { + now += o->retrytime; if (o->callingpid && (o->callingpid == ast_mainpid)) { safe_append(o, time(NULL), "DelayedRetry"); ast_log(LOG_DEBUG, "Delaying retry since we're currently running '%s'\n", o->fn); + free(o); } else { /* Increment retries */ o->retries++; @@ -285,7 +288,6 @@ 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);