- remove double writing

This commit is contained in:
zolliker
2008-01-18 07:27:57 +00:00
parent 3a0b2e21be
commit b82e58647c

View File

@ -262,6 +262,10 @@
} }
} }
/*---------------------------------------------------------------------------*/
void SICSLogEnable(int flag) {
iLogUsable=flag;
}
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void SICSLogWrite(char *pText, OutCode eOut) void SICSLogWrite(char *pText, OutCode eOut)
{ {
@ -281,6 +285,7 @@
if( (pCurrent->iOut == eOut) || (pCurrent->iAllFlag == 1) ) if( (pCurrent->iOut == eOut) || (pCurrent->iAllFlag == 1) )
{ {
NETWrite(pCurrent->pCon->pSock,pText,strlen(pText)); NETWrite(pCurrent->pCon->pSock,pText,strlen(pText));
NETWrite(pCurrent->pCon->pSock,"\n",1);
} }
pCurrent = pCurrent->pNext; pCurrent = pCurrent->pNext;
} }
@ -317,16 +322,5 @@
fprintf(fLogFile,"%s\n",pText); fprintf(fLogFile,"%s\n",pText);
fflush(fLogFile); fflush(fLogFile);
iLineCount++; iLineCount++;
/* do all captured as well */
pCurrent = pCapture;
while(pCurrent)
{
if( (pCurrent->iOut == eOut) || (pCurrent->iAllFlag == 1) )
{
NETWrite(pCurrent->pCon->pSock,pText,strlen(pText));
}
pCurrent = pCurrent->pNext;
}
} }
} }