[Bro-Dev] conn-size
Gregor Maier
gregor at icir.org
Tue May 3 10:31:02 PDT 2011
Actually there's a bit more to that. Even the original code did a
Unref(conn_val);
conn_val = 0;
in Connection::FlipRoles(), i.e. the full conn_val had to be rebuild
after a FlipRole() and only the endpoint pointers were reused as the
original code also kept distinct pointers to the endp_vals.
My code however doesn't keep pointers to the endp_vals, because I now
use a root_analyzer->UpateConnVal() instead of two
root_analyzer->UpdateEndpointVal() calls. As per our general discussion,
I'm doing this so that any child analyzer could now update or extend the
conn_val or the endpoint vals. So, swapping doesn't make sense anymore
unless we keep conn_val (in which case conn_id and the endp_vals have to
be replaced).
(However, I just saw that the conn_size analyzer doesn't flip its
counters. Will fix that.)
(sorry for the first, incorrect e-mail. Should reply to e-mails before
my first coffee)
cu
gregor
On 5/2/11 16:06 , Robin Sommer wrote:
> Gregor,
>
> the following is part of your conn-size patch:
>
> - RecordVal* tmp_rc = resp_endp;
> - resp_endp = orig_endp;
> - orig_endp = tmp_rc;
> -
> + // Delete conn_val, will build a new one next time we need one
> + // XXX: breaks the assumption that conn_val never changes!!
>
>
> Why does a swap not work anymore?
>
> Robin
>
--
Gregor Maier
<gregor at icir.org> <gregor at icsi.berkeley.edu>
Int. Computer Science Institute (ICSI)
1947 Center St., Ste. 600
Berkeley, CA 94704, USA
http://www.icir.org/gregor/
More information about the bro-dev
mailing list