mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
Fixing bugs in communication.
- The reporter can't be used from the child process. - Don't attempt to send a zero-sized chunk when remote print buffer is empty.
This commit is contained in:
parent
b520f98541
commit
4580bef3e6
4 changed files with 29 additions and 16 deletions
|
@ -195,7 +195,7 @@ bool ChunkedIOFd::WriteChunk(Chunk* chunk, bool partial)
|
|||
assert(chunk->len <= BUFFER_SIZE - sizeof(uint32) );
|
||||
|
||||
if ( chunk->len == 0 )
|
||||
reporter->InternalError("attempt to write 0 bytes chunk");
|
||||
InternalError("attempt to write 0 bytes chunk");
|
||||
|
||||
if ( partial )
|
||||
chunk->len |= FLAG_PARTIAL;
|
||||
|
@ -285,7 +285,7 @@ bool ChunkedIOFd::FlushWriteBuffer()
|
|||
}
|
||||
|
||||
if ( written == 0 )
|
||||
reporter->InternalError("written==0");
|
||||
InternalError("written==0");
|
||||
|
||||
// Short write.
|
||||
write_pos += written;
|
||||
|
@ -906,7 +906,7 @@ bool ChunkedIOSSL::WriteData(char* p, uint32 len, bool* error)
|
|||
return false;
|
||||
}
|
||||
|
||||
reporter->InternalError("can't be reached");
|
||||
InternalError("can't be reached");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1026,7 +1026,7 @@ bool ChunkedIOSSL::ReadData(char* p, uint32 len, bool* error)
|
|||
}
|
||||
|
||||
// Can't be reached.
|
||||
reporter->InternalError("can't be reached");
|
||||
InternalError("can't be reached");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue