зеркало из https://github.com/microsoft/msquic.git
Misc Clean Up (#373)
This commit is contained in:
Родитель
bdeb94d78c
Коммит
e249f17272
|
@ -60,7 +60,7 @@ Parameters Description:
|
|||
Return Value:
|
||||
|
||||
A success status as determined by NT_SUCCESS macro, if successful.
|
||||
|
||||
|
||||
--*/
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
|
|
@ -882,10 +882,10 @@ QuicCertValidateChain(
|
|||
int ServerNameLength = MultiByteToWideChar(CP_UTF8, 0, Host, -1, NULL, 0);
|
||||
if (ServerNameLength == 0) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
GetLastError(),
|
||||
"MultiByteToWideChar(1) failed");
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
GetLastError(),
|
||||
"MultiByteToWideChar(1) failed");
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
@ -902,10 +902,10 @@ QuicCertValidateChain(
|
|||
ServerNameLength = MultiByteToWideChar(CP_UTF8, 0, Host, -1, ServerName, ServerNameLength);
|
||||
if (ServerNameLength == 0) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
GetLastError(),
|
||||
"MultiByteToWideChar(2) failed");
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
GetLastError(),
|
||||
"MultiByteToWideChar(2) failed");
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,8 +36,8 @@ Notes:
|
|||
|
||||
We have speeded the implementation by processing the hash input four bits
|
||||
at a time. This requires us to maintain a lookup table of 16 32-bit entries
|
||||
for each nibble of the hash input.
|
||||
|
||||
for each nibble of the hash input.
|
||||
|
||||
This implementation assumes that the output of the hash is always 32-bit.
|
||||
It also assumes that the caller will pass in a array of bytes to hash, and
|
||||
the number of bits in the hash input will always be a multiple of 8 -- that
|
||||
|
@ -67,7 +67,7 @@ QuicToeplitzHashInitialize(
|
|||
// directly be looked up to find out what value needs to be XORed
|
||||
// into the result based on the value of the nibble. Therefore, a
|
||||
// 4 byte hash input will have 8 nibbles, and each of the nibbles
|
||||
// has a separate lookup table. This lookup table is looked up
|
||||
// has a separate lookup table. This lookup table is looked up
|
||||
// based on the nibble value, the contents are XORed into the result
|
||||
// and we then move to the next nibble of the input, and the next
|
||||
// table.
|
||||
|
@ -77,7 +77,7 @@ QuicToeplitzHashInitialize(
|
|||
// Initialize the Toeplitz->LookupTables.
|
||||
//
|
||||
for (uint32_t i = 0; i < QUIC_TOEPLITZ_LOOKUP_TABLE_COUNT; i++) {
|
||||
//
|
||||
//
|
||||
// First construct the 32-bit word that is obtained after
|
||||
// shifting the key left by i*4 bits. That goes into Word1
|
||||
//
|
||||
|
|
|
@ -530,7 +530,7 @@ public:
|
|||
Error = GetLastError();
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Error,
|
||||
"GetFullPathName failed");
|
||||
return false;
|
||||
|
@ -544,7 +544,7 @@ public:
|
|||
if (ServiceHandle == nullptr) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
GetLastError(),
|
||||
"OpenService failed");
|
||||
char DriverFilePath[MAX_PATH];
|
||||
|
@ -558,7 +558,7 @@ public:
|
|||
Error = GetLastError();
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Error,
|
||||
"GetFullPathName failed");
|
||||
return false;
|
||||
|
@ -585,7 +585,7 @@ public:
|
|||
}
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Error,
|
||||
"CreateService failed");
|
||||
return false;
|
||||
|
@ -607,7 +607,7 @@ public:
|
|||
if (Error != ERROR_SERVICE_ALREADY_RUNNING) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Error,
|
||||
"StartService failed");
|
||||
return false;
|
||||
|
@ -651,7 +651,7 @@ public:
|
|||
Error = GetLastError();
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Error,
|
||||
"CreateFile failed");
|
||||
return false;
|
||||
|
@ -686,7 +686,7 @@ public:
|
|||
Error = GetLastError();
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Error,
|
||||
"CreateEvent failed");
|
||||
return false;
|
||||
|
@ -708,7 +708,7 @@ public:
|
|||
CloseHandle(Overlapped.hEvent);
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Error,
|
||||
"DeviceIoControl failed");
|
||||
return false;
|
||||
|
@ -728,7 +728,7 @@ public:
|
|||
}
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Error,
|
||||
"GetOverlappedResultEx failed");
|
||||
} else {
|
||||
|
|
|
@ -77,7 +77,7 @@ QuicTestCtlInitialize(
|
|||
if (QUIC_FAILED(Status)) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Status,
|
||||
"MsQuicOpen");
|
||||
goto Error;
|
||||
|
@ -103,7 +103,7 @@ QuicTestCtlInitialize(
|
|||
if (!NT_SUCCESS(Status)) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Status,
|
||||
"WdfDeviceInitAssignName failed");
|
||||
goto Error;
|
||||
|
@ -131,7 +131,7 @@ QuicTestCtlInitialize(
|
|||
if (!NT_SUCCESS(Status)) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Status,
|
||||
"WdfDeviceCreate failed");
|
||||
goto Error;
|
||||
|
@ -146,7 +146,7 @@ QuicTestCtlInitialize(
|
|||
if (!NT_SUCCESS(Status)) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Status,
|
||||
"WdfDeviceCreateSymbolicLink failed");
|
||||
goto Error;
|
||||
|
@ -168,7 +168,7 @@ QuicTestCtlInitialize(
|
|||
if (!NT_SUCCESS(Status)) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Status,
|
||||
"WdfIoQueueCreate failed");
|
||||
goto Error;
|
||||
|
@ -264,7 +264,7 @@ QuicTestCtlEvtFileCreate(
|
|||
if (QUIC_FAILED(Status)) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Status,
|
||||
"RegistrationOpen");
|
||||
break;
|
||||
|
@ -418,7 +418,7 @@ QuicTestCtlSetSecurityConfig(
|
|||
if (QUIC_FAILED(Status)) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Status,
|
||||
"SecConfigCreate");
|
||||
goto Error;
|
||||
|
@ -625,7 +625,7 @@ QuicTestCtlEvtIoDeviceControl(
|
|||
Status = STATUS_NOT_IMPLEMENTED;
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
FunctionCode,
|
||||
"Invalid FunctionCode");
|
||||
goto Error;
|
||||
|
@ -635,7 +635,7 @@ QuicTestCtlEvtIoDeviceControl(
|
|||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
FunctionCode,
|
||||
"Invalid buffer size for FunctionCode");
|
||||
goto Error;
|
||||
|
@ -652,7 +652,7 @@ QuicTestCtlEvtIoDeviceControl(
|
|||
if (!NT_SUCCESS(Status)) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Status,
|
||||
"WdfRequestRetrieveInputBuffer failed");
|
||||
goto Error;
|
||||
|
|
|
@ -104,7 +104,7 @@ Return Value:
|
|||
if (!NT_SUCCESS(Status)) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Status,
|
||||
"QuicPlatformInitialize failed");
|
||||
goto Error;
|
||||
|
@ -129,7 +129,7 @@ Return Value:
|
|||
if (!NT_SUCCESS(Status)) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Status,
|
||||
"WdfDriverCreate failed");
|
||||
goto Error;
|
||||
|
@ -142,7 +142,7 @@ Return Value:
|
|||
if (!NT_SUCCESS(Status)) {
|
||||
QuicTraceEvent(
|
||||
LibraryErrorStatus,
|
||||
"[ lib] ERROR, %d, %s.",
|
||||
"[ lib] ERROR, %u, %s.",
|
||||
Status,
|
||||
"QuicTestCtlInitialize failed");
|
||||
goto Error;
|
||||
|
|
Загрузка…
Ссылка в новой задаче