- remove double writing
This commit is contained in:
16
servlog.c
16
servlog.c
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user