mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 09:30:55 +00:00
[TCPIP]
- Enable logging now that IoWriteErrorLogEntry works. - Check for log event size before calling IoAllocateErrorLogEntry. - Reduce code indentation in the logging function. svn path=/trunk/; revision=73169
This commit is contained in:
parent
323bd18771
commit
12e8ef0213
|
@ -50,7 +50,6 @@ VOID TiWriteErrorLog(
|
|||
* DumpData = Pointer to dump data for the log entry
|
||||
*/
|
||||
{
|
||||
#if 0
|
||||
PIO_ERROR_LOG_PACKET LogEntry;
|
||||
UCHAR EntrySize;
|
||||
ULONG StringSize;
|
||||
|
@ -65,15 +64,19 @@ VOID TiWriteErrorLog(
|
|||
EntrySize += (UCHAR)StringSize;
|
||||
}
|
||||
|
||||
LogEntry = (PIO_ERROR_LOG_PACKET)IoAllocateErrorLogEntry(
|
||||
DriverContext, EntrySize);
|
||||
/* Fail if the required error log entry is too large */
|
||||
if (EntrySize > ERROR_LOG_MAXIMUM_SIZE)
|
||||
return;
|
||||
|
||||
LogEntry = (PIO_ERROR_LOG_PACKET)IoAllocateErrorLogEntry(DriverContext, EntrySize);
|
||||
if (!LogEntry)
|
||||
return;
|
||||
|
||||
if (LogEntry) {
|
||||
LogEntry->MajorFunctionCode = -1;
|
||||
LogEntry->RetryCount = -1;
|
||||
LogEntry->DumpDataSize = (USHORT)(DumpDataCount * sizeof(ULONG));
|
||||
LogEntry->NumberOfStrings = (String == NULL) ? 1 : 2;
|
||||
LogEntry->StringOffset = sizeof(IO_ERROR_LOG_PACKET) + (DumpDataCount-1) * sizeof(ULONG);
|
||||
LogEntry->StringOffset = sizeof(IO_ERROR_LOG_PACKET) + (DumpDataCount * sizeof(ULONG));
|
||||
LogEntry->EventCategory = 0;
|
||||
LogEntry->ErrorCode = ErrorCode;
|
||||
LogEntry->UniqueErrorValue = UniqueErrorValue;
|
||||
|
@ -93,8 +96,6 @@ VOID TiWriteErrorLog(
|
|||
|
||||
IoWriteErrorLogEntry(LogEntry);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* FUNCTION: Creates a file object
|
||||
|
|
Loading…
Reference in a new issue