diff options
author | Hugo Landau <hlandau@openssl.org> | 2024-02-08 09:55:24 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2024-02-09 11:03:52 +0000 |
commit | 1548e3cdaa3d478bdfbb214855a537be184db89f (patch) | |
tree | 8e3c19543d977781014cc2b7c9c442eb360f60e3 | |
parent | 1260d0f5792b5253ecd8ca23eee848ab2c50c1ea (diff) |
QUIC QLOG: Retrieve PID correctly on Windows
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23517)
-rw-r--r-- | ssl/quic/qlog.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ssl/quic/qlog.c b/ssl/quic/qlog.c index dc68ffb239..2cfa9af9d3 100644 --- a/ssl/quic/qlog.c +++ b/ssl/quic/qlog.c @@ -316,9 +316,12 @@ static void qlog_event_seq_header(QLOG *qlog) ossl_json_key(&qlog->json, "process_id"); ossl_json_u64(&qlog->json, qlog->info.override_process_id); } else { -#if defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_WINDOWS) +#if defined(OPENSSL_SYS_UNIX) ossl_json_key(&qlog->json, "process_id"); ossl_json_u64(&qlog->json, (uint64_t)getpid()); +#elif defined(OPENSSL_SYS_WINDOWS) + ossl_json_key(&qlog->json, "process_id"); + ossl_json_u64(&qlog->json, (uint64_t)GetCurrentProcessId()); #endif } } /* system_info */ |