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__
parent
6ba0b46cec
commit
d31e57a10d
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue