Skip to content

Commit

Permalink
Unconditionally log protocol version negotiation
Browse files Browse the repository at this point in the history
  • Loading branch information
reynir committed Nov 25, 2020
1 parent 9731ffc commit 0e3525a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/rExec.ml
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ let with_flow ~ty ~domid ~port fn =
recv_hello client >>= function
| version when version < 2l -> fail (error "Unsupported qrexec version %ld" version)
| version ->
if version > 2l
then Log.debug (fun f -> f "Other end wants to use newer protocol %lu, \
continuing with version 2" version);
Log.info (fun f -> f "client connected,\
other end wants to use protocol version %lu, \
continuing with version 2" version);
send_hello client >|= fun () ->
Flow.create ~ty client
)
Expand Down Expand Up @@ -379,8 +379,7 @@ let connect ~domid () =
recv_hello t.t >>= function
| version when version < 2l -> fail (error "Unsupported qrexec version %ld" version)
| version ->
if version > 2l
then Log.debug (fun f -> f "Other end wants to use newer protocol %lu, \
continuing with version 2" version);
Log.info (fun f -> f "client connected, using protocol version 2");
Log.info (fun f -> f "client connected, \
other end wants to use protocol version %lu, \
continuing with version 2" version);
return t

0 comments on commit 0e3525a

Please sign in to comment.