Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-05-07 01:04:50 -0400
committerEugene Tarassov2013-05-07 01:04:50 -0400
commit8916f9768b147796c293885e4f9e99fe8ff46808 (patch)
treeaa6ddc705f7b9d037122cff370d4655bcdf80f64
parentb03fd2a546d6490ef7352b070c3b120867b95e4f (diff)
downloadorg.eclipse.tcf.agent-8916f9768b147796c293885e4f9e99fe8ff46808.tar.gz
org.eclipse.tcf.agent-8916f9768b147796c293885e4f9e99fe8ff46808.tar.xz
org.eclipse.tcf.agent-8916f9768b147796c293885e4f9e99fe8ff46808.zip
TCF Agent: fixed: if a client sends stepping command and disconnects, execution of the command should be aborted
-rw-r--r--agent/tcf/services/runctrl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/agent/tcf/services/runctrl.c b/agent/tcf/services/runctrl.c
index 27bd67ed..3b2fced3 100644
--- a/agent/tcf/services/runctrl.c
+++ b/agent/tcf/services/runctrl.c
@@ -647,14 +647,11 @@ static void start_step_mode(Context * ctx, Channel * c, int mode, ContextAddress
release_error_report(ext->step_error);
ext->step_error = NULL;
}
+ assert(ext->step_channel == NULL);
if (c != NULL) {
ext->step_channel = c;
channel_lock(ext->step_channel);
}
- else if (ext->step_channel != NULL) {
- channel_unlock(ext->step_channel);
- ext->step_channel = NULL;
- }
ext->step_done = NULL;
ext->step_mode = mode;
ext->step_range_start = range_start;
@@ -1769,6 +1766,9 @@ static int sync_run_state(void) {
ext->step_mode == RM_TERMINATE || ext->step_mode == RM_DETACH) {
ext->step_continue_mode = ext->step_mode;
}
+ else if (ext->step_channel != NULL && is_channel_closed(ext->step_channel)) {
+ cancel_step_mode(ctx);
+ }
else {
cache_set_def_channel(ext->step_channel);
if (update_step_machine_state(ctx) < 0) {

Back to the top