PSI sics-cvs-psi-complete-tree-post-site-support
This commit is contained in:
18
conman.c
18
conman.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user