summaryrefslogtreecommitdiff
path: root/addons/ooh323c/src/ootrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'addons/ooh323c/src/ootrace.c')
-rw-r--r--addons/ooh323c/src/ootrace.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/addons/ooh323c/src/ootrace.c b/addons/ooh323c/src/ootrace.c
index ba77e7fd1..3e097faa5 100644
--- a/addons/ooh323c/src/ootrace.c
+++ b/addons/ooh323c/src/ootrace.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -47,7 +47,7 @@ void ooTrace(OOUINT32 traceLevel, const char * fmtspec, ...) {
if(traceLevel > gs_traceLevel) return;
va_start (arglist, fmtspec);
/* memset(logMessage, 0, MAXLOGMSGLEN);*/
- vsprintf(logMessage, fmtspec, arglist);
+ vsprintf(logMessage, fmtspec, arglist);
va_end(arglist);
ooTraceLogMessage(logMessage);
}
@@ -59,18 +59,18 @@ void ooTraceLogMessage(const char * logMessage)
static int lasttime=25;
int printDate =0;
static int printTime=1;
-
+
#ifdef _WIN32
-
+
SYSTEMTIME systemTime;
GetLocalTime(&systemTime);
- GetTimeFormat(LOCALE_SYSTEM_DEFAULT,0, &systemTime, "HH':'mm':'ss",
+ GetTimeFormat(LOCALE_SYSTEM_DEFAULT,0, &systemTime, "HH':'mm':'ss",
timeString, 100);
GetTimeFormat(LOCALE_SYSTEM_DEFAULT,0, &systemTime, "H", currtime, 3);
if(lasttime> atoi(currtime))
printDate=1;
lasttime = atoi(currtime);
-
+
#else
struct tm *ptime;
char dateString[10];
@@ -80,10 +80,10 @@ void ooTraceLogMessage(const char * logMessage)
strftime(currtime, 3, "%H", ptime);
if(lasttime>atoi(currtime))
printDate = 1;
- lasttime = atoi(currtime);
+ lasttime = atoi(currtime);
#endif
-
+
#ifdef _WIN32
if(printDate)
{
@@ -92,25 +92,25 @@ void ooTraceLogMessage(const char * logMessage)
systemTime.wMonth, systemTime.wDay, systemTime.wYear);
}
if(printTime) {
- fprintf(gH323ep.fptraceFile, "%s:%03d %s", timeString,
+ fprintf(gH323ep.fptraceFile, "%s:%03d %s", timeString,
systemTime.wMilliseconds, logMessage);
}
else
fprintf(gH323ep.fptraceFile, "%s", logMessage);
-
+
fflush(gH323ep.fptraceFile);
#else
if(printDate)
{
printDate = 0;
strftime(dateString, 10, "%d", ptime);
- fprintf(gH323ep.fptraceFile, "---------Date %s---------\n",
+ fprintf(gH323ep.fptraceFile, "---------Date %s---------\n",
dateString);
}
if(printTime) {
struct timeval systemTime;
gettimeofday(&systemTime, NULL);
- fprintf(gH323ep.fptraceFile, "%s:%03ld %s", timeString,
+ fprintf(gH323ep.fptraceFile, "%s:%03ld %s", timeString,
(long) systemTime.tv_usec/1000, logMessage);
}
else
@@ -118,7 +118,7 @@ void ooTraceLogMessage(const char * logMessage)
fflush(gH323ep.fptraceFile);
#endif
-
+
if(strchr(logMessage, '\n'))
printTime = 1;
else
@@ -131,4 +131,3 @@ int ooLogAsn1Error(int stat, const char * fname, int lno)
OOTRACEERR4("Asn1Error: %d at %s:%d\n", stat, fname, lno);
return stat;
}
-