- Moves references to global jtag interface to default core implementation.
- Missed this reference in the earlier "pointless" patch. Mea culpa.
Important: this has a side-effect. Previously, the error return inside
the interface routine short-circuited the remainder of that function
when 'init' has not been called. With this patch, the command queue
will be cleared in the case that 'init' has been called. Since that
case indicates a buggy script, this does not seem to be a problem.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1995
b42882b7-edfa-0310-969c-
e2dbd0fdcd60
int interface_jtag_execute_queue(void)
{
- int retval;
-
- if (jtag==NULL)
- {
- LOG_ERROR("No JTAG interface configured yet. Issue 'init' command in startup scripts before communicating with targets.");
- return ERROR_FAIL;
- }
-
- retval = default_interface_jtag_execute_queue();
-
+ int retval = default_interface_jtag_execute_queue();
if (retval == ERROR_OK)
{
struct jtag_callback_entry *entry;
int default_interface_jtag_execute_queue(void)
{
+ if (NULL == jtag)
+ {
+ LOG_ERROR("No JTAG interface configured yet. "
+ "Issue 'init' command in startup scripts "
+ "before communicating with targets.");
+ return ERROR_FAIL;
+ }
+
return jtag->execute_queue();
}