Skip to content
Snippets Groups Projects
Commit d31e57a1 authored by zwelch's avatar zwelch
Browse files

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
parent 6ba0b46c
No related branches found
No related tags found
No related merge requests found
...@@ -282,8 +282,12 @@ int jtag_call_event_callbacks(enum jtag_event event) ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment