summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2024-02-08 10:55:24 +0100
committerHugo Landau <hlandau@openssl.org>2024-02-09 12:03:52 +0100
commit1548e3cdaa3d478bdfbb214855a537be184db89f (patch)
tree8e3c19543d977781014cc2b7c9c442eb360f60e3 /ssl
parentJSON_ENC: Fix unit test for MSVC (diff)
downloadopenssl-1548e3cdaa3d478bdfbb214855a537be184db89f.tar.xz
openssl-1548e3cdaa3d478bdfbb214855a537be184db89f.zip
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)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/quic/qlog.c5
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 */