[Com0com-cvs] com0com io.c,1.12,1.13 trace.c,1.12,1.13 trace.h,1.4,1.5 trace.reg,1.3,1.4
The virtual serial port driver for Windows.
Brought to you by:
vfrolov
From: Vyacheslav F. <vf...@us...> - 2005-09-13 08:55:48
|
Update of /cvsroot/com0com/com0com In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24982 Modified Files: io.c trace.c trace.h trace.reg Log Message: Disabled modem status tracing by default Index: trace.c =================================================================== RCS file: /cvsroot/com0com/com0com/trace.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** trace.c 9 Sep 2005 15:21:32 -0000 1.12 --- trace.c 13 Sep 2005 08:55:41 -0000 1.13 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.13 2005/09/13 08:55:41 vfrolov + * Disabled modem status tracing by default + * * Revision 1.12 2005/09/09 15:21:32 vfrolov * Added additional flushing for saved strings *************** *** 93,96 **** --- 96,100 ---- ULONG getCommStatus; ULONG getModemStatus; + ULONG modemStatus; } traceEnable; /********************************************************************/ *************** *** 150,154 **** NTSTATUS status; UNICODE_STRING traceRegistryPath; ! RTL_QUERY_REGISTRY_TABLE queryTable[7]; ULONG zero = 0; --- 154,158 ---- NTSTATUS status; UNICODE_STRING traceRegistryPath; ! RTL_QUERY_REGISTRY_TABLE queryTable[8]; ULONG zero = 0; *************** *** 210,213 **** --- 214,224 ---- queryTable[5].DefaultLength = sizeof(ULONG); + queryTable[6].Flags = RTL_QUERY_REGISTRY_DIRECT; + queryTable[6].Name = L"ModemStatus"; + queryTable[6].EntryContext = &traceEnable.modemStatus; + queryTable[6].DefaultType = REG_DWORD; + queryTable[6].DefaultData = &zero; + queryTable[6].DefaultLength = sizeof(ULONG); + status = RtlQueryRegistryValues( RTL_REGISTRY_ABSOLUTE, *************** *** 1082,1085 **** --- 1093,1111 ---- } + VOID TraceModemStatus(IN PC0C_IO_PORT pIoPort) + { + if (!TRACE_FILE_OK) + return; + + if (!traceEnable.modemStatus) + return; + + TraceMask( + (PC0C_COMMON_EXTENSION)pIoPort->pDevExt, + "ModemStatus", + codeNameTableModemStatus, + pIoPort->modemStatus); + } + VOID TraceIrp( IN PCHAR pHead, Index: trace.h =================================================================== RCS file: /cvsroot/com0com/com0com/trace.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** trace.h 6 Sep 2005 06:49:39 -0000 1.4 --- trace.h 13 Sep 2005 08:55:41 -0000 1.5 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.5 2005/09/13 08:55:41 vfrolov + * Disabled modem status tracing by default + * * Revision 1.4 2005/09/06 06:49:39 vfrolov * Added codeNameTableErrors[] *************** *** 91,94 **** --- 94,99 ---- IN ULONG mask); + VOID TraceModemStatus(IN PC0C_IO_PORT pIoPort); + VOID TraceIrp( IN PCHAR pHead, *************** *** 126,129 **** --- 131,135 ---- #define TraceCode(a1, a2, a3, a4, a5) #define TraceMask(a1, a2, a3, a4) + #define TraceModemStatus(a1) #define TraceIrp(a1, a2, a3, a4) Index: trace.reg =================================================================== RCS file: /cvsroot/com0com/com0com/trace.reg,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** trace.reg 30 Aug 2005 13:12:04 -0000 1.3 --- trace.reg 13 Sep 2005 08:55:41 -0000 1.4 *************** *** 11,12 **** --- 11,13 ---- "GetCommStatus"=dword:00000000 "GetModemStatus"=dword:00000000 + "ModemStatus"=dword:00000000 Index: io.c =================================================================== RCS file: /cvsroot/com0com/com0com/io.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** io.c 6 Sep 2005 07:23:44 -0000 1.12 --- io.c 13 Sep 2005 08:55:41 -0000 1.13 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.13 2005/09/13 08:55:41 vfrolov + * Disabled modem status tracing by default + * * Revision 1.12 2005/09/06 07:23:44 vfrolov * Implemented overrun emulation *************** *** 569,581 **** pIoPort->modemStatus &= ~bits; - TraceMask( - (PC0C_COMMON_EXTENSION)pIoPort->pDevExt, - "ModemStatus", - codeNameTableModemStatus, - pIoPort->modemStatus); - modemStatusChanged = modemStatusOld ^ pIoPort->modemStatus; if (modemStatusChanged) { if (pIoPort->escapeChar) { NTSTATUS status; --- 572,580 ---- pIoPort->modemStatus &= ~bits; modemStatusChanged = modemStatusOld ^ pIoPort->modemStatus; if (modemStatusChanged) { + TraceModemStatus(pIoPort); + if (pIoPort->escapeChar) { NTSTATUS status; |