diff --git a/README.md b/README.md index 99fd8ac6b..81957c549 100755 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ For previous versions, please read: ## V3 changes +* v3.0, 2020-01-08, Merge [#1554][bug #1554], support logrotate copytruncate. 3.0.96 * v3.0, 2020-01-05, Always use string instance to avoid crash risk. 3.0.95 * v3.0, 2020-01-05, For [#460][bug #460], fix ipv6 hostport parsing bug. 3.0.94 * v3.0, 2020-01-05, For [#460][bug #460], fix ipv6 intranet address filter bug. 3.0.93 @@ -272,6 +273,7 @@ For previous versions, please read: ## V2 changes +* v2.0, 2020-01-08, Merge [#1554][bug #1554], support logrotate copytruncate. 2.0.271 * v2.0, 2020-01-05, Merge [#1551][bug #1551], fix memory leak in RTSP stack. 2.0.270 * v2.0, 2019-12-26, For [#1488][bug #1488], pass client ip to http callback. 2.0.269 * v2.0, 2019-12-23, Fix [srs-librtmp #22](https://github.com/ossrs/srs-librtmp/issues/22), parse vhost splited by single seperator. 2.0.268 @@ -1551,6 +1553,7 @@ Winlin [bug #1524]: https://github.com/ossrs/srs/issues/1524 [bug #1488]: https://github.com/ossrs/srs/issues/1488 [bug #1551]: https://github.com/ossrs/srs/pull/1551 +[bug #1554]: https://github.com/ossrs/srs/pull/1554 [bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx [bug #735]: https://github.com/ossrs/srs/issues/735 diff --git a/trunk/src/app/srs_app_log.cpp b/trunk/src/app/srs_app_log.cpp index eeba11186..d22ab38c1 100644 --- a/trunk/src/app/srs_app_log.cpp +++ b/trunk/src/app/srs_app_log.cpp @@ -318,11 +318,7 @@ void SrsFastLog::open_log_file() if (filename.empty()) { return; } - - fd = ::open(filename.c_str(), O_RDWR | O_APPEND); - - if(fd == -1 && errno == ENOENT) { - fd = open(filename.c_str(), O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH); - } + + fd = ::open(filename.c_str(), O_RDWR | O_CREAT | O_APPEND); } diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 0eb763b92..94278aaeb 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -27,7 +27,7 @@ // The version config. #define VERSION_MAJOR 3 #define VERSION_MINOR 0 -#define VERSION_REVISION 95 +#define VERSION_REVISION 96 // The macros generated by configure script. #include