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/1076

-- gerrit

commit 16c1915d60ff9ba2cb45119365af0bd6a4677d8f
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: I04cd8bf892ff42f57567b4b5b3bd6ddeaa3406aa
    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