aboutsummaryrefslogtreecommitdiffstats
path: root/main/dnsmgr.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-27 22:35:29 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-27 22:35:29 +0000
commitc83caa1ae0033f53e8e51f98415a48f69fb0b349 (patch)
tree7b27e35fa085d171969d24fcc34ee5ba0350fead /main/dnsmgr.c
parent76bbd4b67a62edd656285e38f7e204a000d6b091 (diff)
Merged revisions 100465 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r100465 | tilghman | 2008-01-27 15:59:53 -0600 (Sun, 27 Jan 2008) | 11 lines When deleting a task from the scheduler, ignoring the return value could possibly cause memory to be accessed after it is freed, which causes all sorts of random memory corruption. Instead, if a deletion fails, wait a bit and try again (noting that another thread could change our taskid value). (closes issue #11386) Reported by: flujan Patches: 20080124__bug11386.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, flujan, stuarth` ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@100488 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/dnsmgr.c')
-rw-r--r--main/dnsmgr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main/dnsmgr.c b/main/dnsmgr.c
index ed2426c2e..0989f6315 100644
--- a/main/dnsmgr.c
+++ b/main/dnsmgr.c
@@ -239,7 +239,7 @@ static int refresh_list(const void *data)
void dnsmgr_start_refresh(void)
{
if (refresh_sched > -1) {
- ast_sched_del(sched, refresh_sched);
+ AST_SCHED_DEL(sched, refresh_sched);
refresh_sched = ast_sched_add_variable(sched, 100, refresh_list, &master_refresh_info, 1);
}
}
@@ -371,8 +371,7 @@ static int do_reload(int loading)
was_enabled = enabled;
enabled = 0;
- if (refresh_sched > -1)
- ast_sched_del(sched, refresh_sched);
+ AST_SCHED_DEL(sched, refresh_sched);
if (config) {
if ((enabled_value = ast_variable_retrieve(config, "general", "enable"))) {