mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Fixed a small problem in the remote serialization code.
This is from ticket #86. It needs verified, but everything seemed to work the same (except for the bug!) with the change.
This commit is contained in:
parent
0a3f84681a
commit
05f27c5441
1 changed files with 7 additions and 14 deletions
|
@ -823,14 +823,9 @@ bool RemoteSerializer::SendCall(SerialInfo* info, PeerID id,
|
||||||
if ( ! peer )
|
if ( ! peer )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Do not send events back to originating peer.
|
|
||||||
if ( current_peer == peer )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return SendCall(info, peer, name, vl);
|
return SendCall(info, peer, name, vl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool RemoteSerializer::SendCall(SerialInfo* info, Peer* peer,
|
bool RemoteSerializer::SendCall(SerialInfo* info, Peer* peer,
|
||||||
const char* name, val_list* vl)
|
const char* name, val_list* vl)
|
||||||
{
|
{
|
||||||
|
@ -1841,10 +1836,9 @@ bool RemoteSerializer::EnterPhaseRunning(Peer* peer)
|
||||||
if ( in_sync == peer )
|
if ( in_sync == peer )
|
||||||
in_sync = 0;
|
in_sync = 0;
|
||||||
|
|
||||||
current_peer->phase = Peer::RUNNING;
|
peer->phase = Peer::RUNNING;
|
||||||
Log(LogInfo, "phase: running", peer);
|
Log(LogInfo, "phase: running", peer);
|
||||||
|
RaiseEvent(remote_connection_handshake_done, peer);
|
||||||
RaiseEvent(remote_connection_handshake_done, current_peer);
|
|
||||||
|
|
||||||
if ( remote_trace_sync_interval )
|
if ( remote_trace_sync_interval )
|
||||||
{
|
{
|
||||||
|
@ -2008,12 +2002,11 @@ bool RemoteSerializer::HandshakeDone(Peer* peer)
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( ! (current_peer->caps & Peer::PID_64BIT) )
|
if ( ! (peer->caps & Peer::PID_64BIT) )
|
||||||
Log(LogInfo, "peer does not support 64bit PIDs; using compatibility mode", current_peer);
|
Log(LogInfo, "peer does not support 64bit PIDs; using compatibility mode", peer);
|
||||||
|
|
||||||
if ( (current_peer->caps & Peer::NEW_CACHE_STRATEGY) )
|
if ( (peer->caps & Peer::NEW_CACHE_STRATEGY) )
|
||||||
Log(LogInfo, "peer supports keep-in-cache; using that",
|
Log(LogInfo, "peer supports keep-in-cache; using that", peer);
|
||||||
current_peer);
|
|
||||||
|
|
||||||
if ( peer->sync_requested != Peer::NONE )
|
if ( peer->sync_requested != Peer::NONE )
|
||||||
{
|
{
|
||||||
|
@ -2030,7 +2023,7 @@ bool RemoteSerializer::HandshakeDone(Peer* peer)
|
||||||
{
|
{
|
||||||
Log(LogError, "misconfiguration: authoritative state on both sides",
|
Log(LogError, "misconfiguration: authoritative state on both sides",
|
||||||
current_peer);
|
current_peer);
|
||||||
CloseConnection(current_peer);
|
CloseConnection(peer);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue