summaryrefslogtreecommitdiff
path: root/main/editline/configure.in
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2015-09-23 14:02:15 -0500
committerMark Michelson <mmichelson@digium.com>2015-09-24 15:03:18 -0500
commitf050fa76eb8535a2b8a3b047527a42ea369d8792 (patch)
tree737c60a43832b992b109be32d766d8b10854e5f6 /main/editline/configure.in
parent3502c0431db52d00eb16dc1cc2462be7a509ba5e (diff)
logger: Prevent duplicate dynamic channels from being added.
There was a problem observed where the "logger add channel" CLI command would allow for a channel with the same name to be added multiple times. This would result in each message being written out to the same file multiple times. The problem was due to the difference in how logger channel filenames are stored versus the format they are allowed to be presented when they are added. For instance, if adding the logger channel "foo" through the CLI, the result would be a logger channel with the file name /var/log/asterisk/foo being stored. So when trying to add another "foo" channel, "foo" would not match "/var/log/asterisk/foo" so we'd happily add the duplicate channel. The fix presented here is to introduce two new methods in the logger code: * make_filename(): given a logger channel name, this creates the filename for that logger channel. * find_logchannel(): given a logger channel name, this calls make_filename() and then traverses the list of logchannels in order to find a match. This change has made use of make_filename() and find_logchannel() throughout to more consistently behave. ASTERISK-25305 #close Reported by Mark Michelson Change-Id: I892d52954d6007d8bc453c3cbdd9235dec9c4a36
Diffstat (limited to 'main/editline/configure.in')
0 files changed, 0 insertions, 0 deletions