]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common: fix win32 event log source
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Wed, 17 Feb 2021 12:49:02 +0000 (12:49 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 23 Feb 2021 09:23:24 +0000 (09:23 +0000)
commit86c7c2f5be96e80d492447d6582131f1b2d3438d
treee29c625283213623ce811075194490cac019de4b
parentf81c94c1a241b50da164a0355ca8450c2a5cdf84
common: fix win32 event log source

The Windows "get_process_name" function uses the input buffer
to store the entire executable path, while the caller only
expects the filename.

The "get_process_name_cpp" function is using an insufficient
buffer, for which reason it will return "(unknown)" when the
executable path exceeds 32 characters.

Windows event log entries have the wrong source because of this.

We'll update "get_process_name" to use a separate buffer for the
full executable path and avoid requesting a larger buffer than
actually needed.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
src/common/code_environment.cc