From: Martin Mares Date: Mon, 16 Feb 2009 22:59:44 +0000 (+0100) Subject: Logging: Let log_file() maintain proper use count of the stream. X-Git-Tag: holmes-import~65 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=ba3130ed7835688d31bf2a0db988b0c48bba96f6;p=libucw.git Logging: Let log_file() maintain proper use count of the stream. --- diff --git a/ucw/log-file.c b/ucw/log-file.c index cd0d037c..f04e68dc 100644 --- a/ucw/log-file.c +++ b/ucw/log-file.c @@ -193,6 +193,7 @@ log_file(const char *name) struct log_stream *def = log_stream_by_flags(0); log_rm_substream(def, NULL); log_add_substream(def, ls); + log_close_stream(ls); } #ifdef TEST @@ -205,6 +206,7 @@ int main(int argc, char **argv) // struct log_stream *ls = log_new_file("/tmp/quork-%Y%m%d-%H%M%S"); for (int i=1; i