projects
/
oweals
/
uclient.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98afb74
)
example: close output file
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 4 May 2014 18:17:47 +0000
(20:17 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 4 May 2014 18:17:47 +0000
(20:17 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uclient-example.c
patch
|
blob
|
history
diff --git
a/uclient-example.c
b/uclient-example.c
index 2874ec2fefb2abf89a7154bd13714dd9313b6305..bee5068e9d220ed937a60faff3b2043d918ee8b0 100644
(file)
--- a/
uclient-example.c
+++ b/
uclient-example.c
@@
-85,6
+85,10
@@
static int open_output_file(const char *path, bool create)
static void request_done(struct uclient *cl)
{
+ if (output_fd >= 0) {
+ close(output_fd);
+ output_fd = -1;
+ }
uclient_disconnect(cl);
uloop_end();
}