Fixed mavlink app termination, terminates now cleanly

This commit is contained in:
Lorenz Meier
2012-10-23 10:58:47 +02:00
parent 3f240a70ba
commit f13c7821d9
2 changed files with 18 additions and 15 deletions
+4 -1
View File
@@ -745,7 +745,10 @@ int mavlink_main(int argc, char *argv[])
if (!strcmp(argv[1], "stop")) {
thread_should_exit = true;
/* XXX should wait for it to actually exit here */
while (thread_running) {
usleep(200000);
}
warnx("terminated.");
exit(0);
}