Skip to content

Commit 731e878

Browse files
committed
Fix #1554, support logrotate copytruncate. 2.0.271
1 parent 459488b commit 731e878

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ Remark:
338338

339339
## History
340340

341+
* v2.0, 2020-01-08, Merge [#1554][bug #1554], support logrotate copytruncate. 2.0.271
341342
* v2.0, 2020-01-05, Merge [#1551][bug #1551], fix memory leak in RTSP stack. 2.0.270
342343
* v2.0, 2019-12-26, For [#1488][bug #1488], pass client ip to http callback. 2.0.269
343344
* 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
@@ -1361,6 +1362,7 @@ Winlin
13611362
[bug #1304]: https://github.com/ossrs/srs/pull/1304
13621363
[bug #1488]: https://github.com/ossrs/srs/issues/1488
13631364
[bug #1551]: https://github.com/ossrs/srs/pull/1551
1365+
[bug #1554]: https://github.com/ossrs/srs/pull/1554
13641366
[bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx
13651367

13661368
[exo #828]: https://github.com/google/ExoPlayer/pull/828

trunk/src/app/srs_app_log.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,13 +410,6 @@ void SrsFastLog::open_log_file()
410410
return;
411411
}
412412

413-
fd = ::open(filename.c_str(), O_RDWR | O_APPEND);
414-
415-
if(fd == -1 && errno == ENOENT) {
416-
fd = open(filename.c_str(),
417-
O_RDWR | O_CREAT | O_TRUNC | O_APPEND/*logrotate copytruncate need this flag*/,
418-
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
419-
);
420-
}
413+
fd = ::open(filename.c_str(), O_RDWR | O_CREAT | O_APPEND);
421414
}
422415

trunk/src/core/srs_core.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3131
// current release version
3232
#define VERSION_MAJOR 2
3333
#define VERSION_MINOR 0
34-
#define VERSION_REVISION 270
34+
#define VERSION_REVISION 271
3535

3636
// generated by configure, only macros.
3737
#include <srs_auto_headers.hpp>

0 commit comments

Comments
 (0)