Skip to content

Commit

Permalink
Fix reference to error code in Jaeger logging (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Aug 2, 2021
1 parent 03f9604 commit 9d83b1c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions exporters/jaeger/src/udp_transport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,21 @@ void UDPTransport::InitSocket()
int err = WSAStartup(wVersionRequested, &wsaData);
if (err != 0)
{
OTEL_INTERNAL_LOG_ERROR("Jaeger Exporter: WSAStartup failed with error: " << error);
OTEL_INTERNAL_LOG_ERROR("Jaeger Exporter: WSAStartup failed with error: " << err);
return;
}

/* Confirm that the WinSock DLL supports 2.2.*/
/* Confirm that the WinSock DLL supports 2.2. */
/* Note that if the DLL supports versions greater */
/* than 2.2 in addition to 2.2, it will still return */
/* 2.2 in wVersion since that is the version we */
/* requested. */

if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2)
{
// TODO: handle error that WinSock 2.2 is not supported.
OTEL_INTERNAL_LOG_ERROR("Jaeger Exporter: winsock " << LOBYTE(wsaData.wVersion) << "."
<< HIBYTE(wsaData.wVersion)
<< " is not supported.");
WSACleanup();

return;
Expand Down

0 comments on commit 9d83b1c

Please sign in to comment.