From: Christian Lamparter Date: Sun, 16 Jan 2011 14:16:06 +0000 (+0100) Subject: carl9170 firmware tools: wol stop after inject error X-Git-Tag: 1.9.3~16 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=3fe042ff62f66381315edd486d8f7ef0369e3e58;p=carl9170fw.git carl9170 firmware tools: wol stop after inject error Signed-off-by: Christian Lamparter --- diff --git a/tools/src/wol.c b/tools/src/wol.c index f2c95d8..6403806 100644 --- a/tools/src/wol.c +++ b/tools/src/wol.c @@ -193,10 +193,12 @@ int main(int argc, char **args) while (num--) { err = inject_frame(sock, wol_magic_tmpl, sizeof(wol_magic_tmpl)); - if (err < 0) + if (err < 0) { fprintf(stderr, "failed to send WOL packet.\n"); - else if (verbose) + break; + } else if (verbose) { fprintf(stdout, "WOL packet sent.\n"); + } } close(sock);