This is an automated email from Gerrit.

Tomasz CEDRO ([email protected]) just uploaded a new patch set to Gerrit, which 
you can find at http://openocd.zylin.com/1035

-- gerrit

commit a4a9d3faf868cc47bb636b63a8051a4359112f1a
Author: Tomek CEDRO <[email protected]>
Date:   Tue Nov 13 02:26:27 2012 +0100

    Initialization is marked as initialized after all initializations are done, 
not before. When something goes wrong and the function cannot handle errors 
user still can change the parameters and try to reinitialize environment.
    
    Change-Id: I8990cd83b4314f940e6054d9d66dc7a7cdc787bb
    Signed-off-by: Tomek CEDRO <[email protected]>

diff --git a/src/openocd.c b/src/openocd.c
index f093077..e56a3ae 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -118,8 +118,6 @@ COMMAND_HANDLER(handle_init_command)
        if (initialized)
                return ERROR_OK;
 
-       initialized = 1;
-
        retval = command_run_line(CMD_CTX, "target init");
        if (ERROR_OK != retval)
                return ERROR_FAIL;
@@ -167,6 +165,8 @@ COMMAND_HANDLER(handle_init_command)
 
        target_register_event_callback(log_target_callback_event_handler, 
CMD_CTX);
 
+       initialized = 1;
+
        return ERROR_OK;
 }
 

-- 

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to