[Bro] runtime-error, value used but not set

Sandro Reichert sanreich at gmx.de
Fri Aug 3 19:07:32 PDT 2007


Hi all!

We are using bro at Dresden University of Technology to develop a 
prototype of a mobile wireless ids. I use broccoli to communicate 
between my local bro and my manager-application.

I need to add and remove peers for inter-bro-communication without 
restarting bro. Therefore I added some new events to remote.bro to add 
and remove peers. To close a active connection, I added some lines in 
RemoteSerializer and bro.bif(_orig) to call RS::CloseConnection.

Adding and connecting new peers works fine, but I get the runtime-error 
'value used but not set' when I call close_connection(id). What did I wrong?

Thanks for your help!
Sandro


my changes:

remote.bro:
event broccoli_remove_peer(host : addr)
{
   for(id in connected_peers)
   {
     if(connected_peers[id]$host == host)
     {
       print (fmt("remove peerID '%s', host = %s", id, host));
       close_connection(id);
     }
   }
}


bro.bif / bro.bif.orig:
function close_connection%(id: count%) : bool
%{
   return new Val(remote_serializer->CloseConnection(id),TYPE_BOOL);
%}


RemoteSerializer.h (public):
bool CloseConnection(PeerID id);


RemoteSerializer.cc:
bool RemoteSerializer::CloseConnection(PeerID id)
{
   return CloseConnection(LookupPeer(id, true));
}



More information about the Bro mailing list