Merge branch 'develop' into moreremo
Conflicts: conman.c
This commit is contained in:
12
conman.c
12
conman.c
@ -1138,7 +1138,7 @@ int SCLogWrite(SConnection * self, char *buffer, int iOut)
|
||||
WriteToCommandLogId(NULL, self->sockHandle, buffer);
|
||||
SetSendingConnection(NULL);
|
||||
|
||||
if(self->iProtocolID == 4) { /* act */
|
||||
if(self->iProtocolID == PROTACT) { /* act */
|
||||
if (strlen(buffer) + 30 > 1024) {
|
||||
pPtr = (char *) malloc((strlen(buffer) + 30) * sizeof(char));
|
||||
memset(pPtr, 0, strlen(buffer) + 20);
|
||||
@ -1150,7 +1150,7 @@ int SCLogWrite(SConnection * self, char *buffer, int iOut)
|
||||
if(pPtr != pBueffel){
|
||||
free(pPtr);
|
||||
}
|
||||
} else if(self->iProtocolID == 2) { /* withcode */
|
||||
} else if(self->iProtocolID == PROTCODE) { /* withcode */
|
||||
if (strlen(buffer) + 30 > 1024) {
|
||||
pPtr = (char *) malloc((strlen(buffer) + 30) * sizeof(char));
|
||||
memset(pPtr, 0, strlen(buffer) + 20);
|
||||
@ -1162,7 +1162,7 @@ int SCLogWrite(SConnection * self, char *buffer, int iOut)
|
||||
if(pPtr != pBueffel){
|
||||
free(pPtr);
|
||||
}
|
||||
} else if(self->iProtocolID == 3) { /* json */
|
||||
} else if(self->iProtocolID == PROTJSON) { /* json */
|
||||
myJson = mkJSON_Object(self,buffer,iOut);
|
||||
if(myJson != NULL){
|
||||
SCDoSockWrite(self,(char *)json_object_to_json_string(myJson));
|
||||
@ -1348,7 +1348,7 @@ int SCWriteZipped(SConnection * self, char *pName, void *pData,
|
||||
memset(outBuf, 0, 65536);
|
||||
|
||||
protocolID = GetProtocolID(self);
|
||||
if (protocolID == 4) {
|
||||
if (protocolID == PROTACT) {
|
||||
cc = SCGetContext(self);
|
||||
sprintf(outBuf, "SICSBIN ZIP %s %d %d\r\n", pName,
|
||||
compressedLength, cc.transID);
|
||||
@ -1423,7 +1423,7 @@ int SCWriteBinary(SConnection * self, char *pName, void *pData,
|
||||
memset(outBuf, 0, 65536);
|
||||
|
||||
protocolID = GetProtocolID(self);
|
||||
if (protocolID == 4) {
|
||||
if (protocolID == PROTACT) {
|
||||
cc = SCGetContext(self);
|
||||
sprintf(outBuf, "SICSBIN BIN %s %d %d\r\n", pName,
|
||||
iDataLen, cc.transID);
|
||||
@ -1529,7 +1529,7 @@ int SCWriteZippedOld(SConnection * self, char *pName, void *pData,
|
||||
memset(outBuf, 0, 65536);
|
||||
|
||||
protocolID = GetProtocolID(self);
|
||||
if (protocolID == 4) {
|
||||
if (protocolID == PROTACT) {
|
||||
cc = SCGetContext(self);
|
||||
sprintf(outBuf, "SICSBIN ZIP %s %d %d\r\n", pName,
|
||||
compressedLength, cc.transID);
|
||||
|
Reference in New Issue
Block a user