diff --git a/bin/deploy.m b/bin/deploy.m index 865f499d..02bb88d2 100644 --- a/bin/deploy.m +++ b/bin/deploy.m @@ -260,7 +260,7 @@ device_subscribe_cb(am_device_notif_context_t ctx) static void usage(void) { - system("open http://www.youtube.com/watch?v=QH2-TGUlwu4"); + system("open http://www.youtube.com/watch?v=1orMXD_Ijbs&feature=fvst"); //fprintf(stderr, "usage: deploy [-d] \n"); exit(1); } diff --git a/bin/sim.m b/bin/sim.m index bf81de43..b415be2c 100644 --- a/bin/sim.m +++ b/bin/sim.m @@ -296,23 +296,14 @@ start_capture(id delegate) if (repl_fd_lock == nil) { repl_fd_lock = [NSLock new]; } + [repl_fd_lock lock]; - - if (![self sendString:expression]) { - goto bail; - } - NSString *res = nil; - while (true) { + if ([self sendString:expression]) { res = [self receiveString]; - if (res == nil) { - goto bail; - } - break; } - -bail: [repl_fd_lock unlock]; + return res; } @@ -474,7 +465,7 @@ bail: static void usage(void) { - system("open http://www.youtube.com/watch?v=QH2-TGUlwu4"); + system("open http://www.youtube.com/watch?v=1orMXD_Ijbs&feature=fvst"); exit(1); }