When deleting a task from the scheduler, ignoring the return value could
commit6f4140d8fa662cda9b1bd5827703229442acf337
authortilghman <tilghman@614ede4d-c843-0410-af14-a771ab80d22e>
Sun, 27 Jan 2008 21:59:53 +0000 (27 21:59 +0000)
committertilghman <tilghman@614ede4d-c843-0410-af14-a771ab80d22e>
Sun, 27 Jan 2008 21:59:53 +0000 (27 21:59 +0000)
treea0610b66a954f2b2f98aedcd42cbc2b4250184b8
parentef8e0b8e0902c44ce8b966c3dee178c6a56ce0cb
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/branches/1.4@100465 614ede4d-c843-0410-af14-a771ab80d22e
channels/chan_h323.c
channels/chan_iax2.c
channels/chan_mgcp.c
channels/chan_misdn.c
channels/chan_sip.c
include/asterisk/sched.h
main/cdr.c
main/dnsmgr.c
main/file.c
main/rtp.c
pbx/pbx_dundi.c