[ 
https://issues.apache.org/jira/browse/TS-4054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15055075#comment-15055075
 ] 

ASF subversion and git services commented on TS-4054:
-----------------------------------------------------

Commit 805ba78e497a6d04fea775a208d14047567d2707 in trafficserver's branch 
refs/heads/master from [~danobi]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=805ba78 ]

TS-4054: refactor and clarify diags_log initialization

Refactor `setup_diagslog()`. Make `setup_diagslog()` return a bool
of whether or not the setup of `blf` was successful or not. Changed
from `setup_diagslog()` actually setting the value for `diags_log`
because this way it is more clear where `diags_log` should be getting
free'd.

This closes #363.


> Incorrect ink_assert behavior in Diags.cc
> -----------------------------------------
>
>                 Key: TS-4054
>                 URL: https://issues.apache.org/jira/browse/TS-4054
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Logging
>            Reporter: Daniel Xu
>             Fix For: 6.1.0
>
>
> In `lib/ts/Diags.cc:setup_diagslog()`, the statement `ink_assert(diags_log == 
> NULL)` is incorrect. It should instead be: `if (blf == NULL) return`
> We should not use an assert here either because when the function is passed a 
> NULL `blf`, it means that some test doesn't want to use the diags.log log 
> file and we should just not set up diagslog.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to