Commit 680c39c0 authored by Jonathon Duerig's avatar Jonathon Duerig

Changed the monitor so it correctly sends an initialization event for virtual UDP sockets.

parent b44c1193
......@@ -417,13 +417,16 @@ def process_event(conn, event, key, timestamp, value):
if emulated_to_real.has_key(dest.remote_ip):
app_connection = sock.lookup(dest)
if app_connection.is_connected == False:
app_connection.is_connected = True
if initial_connection_bandwidth.has_key(app_connection.dest.remote_ip):
app_connection.last_bandwidth = initial_connection_bandwidth[app_connection.dest.remote_ip]
else:
app_connection.last_bandwidth = 0
app_connection.prev_time = timestamp
app_connection.is_connected = True
set_connection(this_ip, app_connection.dest.local_port,
app_connection.dest.remote_ip,
app_connection.dest.remote_port,
proto_to_string(sock.protocol), 'CREATE')
send_connect(conn, key + save_short(app_connection.number),
sock, app_connection)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment