From 878a2c6a4c7bd5d827cab436107a4ca9868d408b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 4 May 2014 19:59:25 +0200 Subject: [PATCH] example: always exit on output file errors Signed-off-by: Felix Fietkau --- uclient-example.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uclient-example.c b/uclient-example.c index 7c54ce3..1f5a82b 100644 --- a/uclient-example.c +++ b/uclient-example.c @@ -98,11 +98,11 @@ static void example_header_done(struct uclient *cl) output_fd = open_output_file(cl->url->location, true); if (output_fd < 0) { - if (!quiet) { + if (!quiet) perror("Cannot open output file"); - error_ret = 3; - uloop_end(); - } + error_ret = 3; + uclient_disconnect(cl); + uloop_end(); } } -- 2.25.1