Use more efficient method to grab the protocol.

get_conn_transport_proto needs to use sessions->FindConnection and do a
hash lookup to find the connection while get_port_transport_proto just
looks at the port directly.
This commit is contained in:
Justin Azoff 2019-01-09 09:46:08 -05:00
parent a97cf10d03
commit a5ad864e13

View file

@ -162,7 +162,7 @@ function new_session(c: connection, trans_id: count): Info
info$ts = network_time(); info$ts = network_time();
info$id = c$id; info$id = c$id;
info$uid = c$uid; info$uid = c$uid;
info$proto = get_conn_transport_proto(c$id); info$proto = get_port_transport_proto(c$id$resp_p);
info$trans_id = trans_id; info$trans_id = trans_id;
return info; return info;
} }