David Brownell <david-b@pacbell.net>:

Let jtag_call_event_callbacks() behave when the callback removes itself.
Oddly, this crashed on x86_32 but not x86_64.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2264 b42882b7-edfa-0310-969c-e2dbd0fdcd60
__archive__
zwelch 2009-06-17 06:40:50 +00:00
parent 6ba0b46cec
commit d31e57a10d
1 changed files with 5 additions and 1 deletions

View File

@ -282,8 +282,12 @@ int jtag_call_event_callbacks(enum jtag_event event)
while (callback) while (callback)
{ {
jtag_event_callback_t *next;
/* callback may remove itself */
next = callback->next;
callback->callback(event, callback->priv); callback->callback(event, callback->priv);
callback = callback->next; callback = next;
} }
return ERROR_OK; return ERROR_OK;