evristzam / ndt

Automatically exported from code.google.com/p/ndt
Other
0 stars 0 forks source link

Fix packet pair timing never returned #85

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Packet pair time was broken with the cleanup of web100_pcap.c. 

The problem was caused by making the globals int mon_pipe1[2] & int 
mon_pipe2[2] static. These were actually external and also used by s2c_srv.c 
and c2s_srv.c. The pipe was created in s2c_srv.c and it wasn't the same 
mon_pipe1 as web100_pcap.c was seeing. (Removing static would be enough to fix 
this)

Purpose of code changes on this branch:
This fixes packet pair timing and removes the confusing globals mon_pipe1/2 
completely along with sig1 and sig2. web100_pcap is running as a fork()'d 
process there shouldn't be any overlap.

Moved closing of pipes out of web_100pcap to s2c_srv.c and c2s_srv.c - seems 
cleaner to close them in the function where the are created.

I've merged duplicate code into one it seemed to be doing the same thing for 
both mon_pipe1 and mon_pipe2.

Fixed an issue with loopback address.

I have tested looks like it's working well.

After the review, I'll merge this branch into:
/trunk

Original issue reported on code.google.com by rsanger...@gmail.com on 19 Jun 2013 at 5:48

Attachments:

GoogleCodeExporter commented 9 years ago
This looks good. Commit at will :)

Original comment by AaronMat...@gmail.com on 20 Jun 2013 at 12:47

GoogleCodeExporter commented 9 years ago
Applied in revision 830.

Original comment by rsanger...@gmail.com on 17 Jul 2013 at 2:59