PSI sics-cvs-psi-complete-tree-post-site-support

This commit is contained in:
2004-03-09 15:18:11 +00:00
committed by Douglas Clowes
parent 6373f6b0fb
commit ae77364de2
196 changed files with 8344 additions and 3485 deletions

View File

@@ -545,6 +545,13 @@ extern pServer pServ;
{
return 0;
}
/*
Do not die if no data
*/
if(pBuffer == NULL)
{
return 0;
}
return self->write(self,pBuffer,iOut);
}
/*-------------------------------------------------------------------------*/
@@ -647,7 +654,7 @@ void SCSetWriteFunc(SConnection *self, writeFunc x)
iRet = NETWrite(self->pSock,buffer,strlen(buffer));
if(!HasNL(buffer))
{
iRet = NETWrite(self->pSock,"\n",sizeof("\n"));
iRet = NETWrite(self->pSock,"\n",strlen("\n"));
}
}
if(!iRet)
@@ -951,6 +958,15 @@ void SCSetWriteFunc(SConnection *self, writeFunc x)
return 0;
}
/*
do nothing if no data
*/
if(pName == NULL || pData == NULL)
{
SCWrite(self,"ERROR: no data to write in SCWriteZiped",eError);
return 0;
}
/* initialize the compression stuff */
compStream.zalloc = (alloc_func)NULL;
compStream.zfree = (free_func)NULL;