T: bugfix in multi

Check result of send_is_on and close connection to tracee on error.
This commit is contained in:
Cedric Roux
2018-08-09 10:18:38 +02:00
parent 5b17b036ba
commit 781133b772
+7 -1
View File
@@ -372,7 +372,13 @@ tracer_error:
remove_tracer(&m, j);
j--;
}
if (is_on_changed && s != -1) send_is_on(s, number_of_events, is_on);
if (is_on_changed && s != -1)
if (send_is_on(s, number_of_events, is_on) == -1) {
clear_remote_config();
shutdown(s, SHUT_RDWR);
close(s);
s = -1;
}
}
return 0;