This is an automated email from Gerrit.

Paul Fertser (fercer...@gmail.com) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/2536

-- gerrit

commit c3c7d1105fcbac9bd131bb83a873798449dff529
Author: Paul Fertser <fercer...@gmail.com>
Date:   Mon Feb 9 16:43:58 2015 +0300

    target/target: call event handlers around examine when polling resumes
    
    The target might be using Tcl examine-start and examine-end handlers,
    they need to be called when the target gets reexamined after polling
    succeeds again.
    
    Change-Id: I371380c6f3c427ec7a0206d73426f6589f18a9bd
    Signed-off-by: Paul Fertser <fercer...@gmail.com>

diff --git a/src/target/target.c b/src/target/target.c
index af5c5b9..f6a1e9d 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2425,6 +2425,7 @@ static int handle_target(void *priv)
                        if (target->backoff.times > 0) {
                                LOG_USER("Polling target %s succeeded again, 
trying to reexamine", target_name(target));
                                target_reset_examined(target);
+                               target_call_event_callbacks(target, 
TARGET_EVENT_EXAMINE_START);
                                retval = target_examine_one(target);
                                /* Target examination could have failed due to 
unstable connection,
                                 * but we set the examined flag anyway to 
repoll it later */
@@ -2432,6 +2433,7 @@ static int handle_target(void *priv)
                                        target->examined = true;
                                        return retval;
                                }
+                               target_call_event_callbacks(target, 
TARGET_EVENT_EXAMINE_END);
                        }
 
                        target->backoff.times = 0;

-- 

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to