From: Joey Hess Date: Fri, 26 Jul 2024 17:24:56 +0000 (-0400) Subject: fix setting protocol version for v0 server X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~21^2~228^2~36 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=de7730f51f36092989b1eb131a92001533c8df9b;p=git-annex.git fix setting protocol version for v0 server Before it was leaving the protocol version at the default, when it was actually v0. v0 has only ever been used over tor, which is probably why this bug was never noticed. --- diff --git a/P2P/Protocol.hs b/P2P/Protocol.hs index eccca1fef7..aec03c3157 100644 --- a/P2P/Protocol.hs +++ b/P2P/Protocol.hs @@ -377,7 +377,7 @@ negotiateProtocolVersion preferredversion = do case r of Just (VERSION v) -> net $ setProtocolVersion v -- Old server doesn't know about the VERSION command. - Just (ERROR _) -> return () + Just (ERROR _) -> net $ setProtocolVersion 0 _ -> net $ sendMessage (ERROR "expected VERSION") sendBypass :: Bypass -> Proto ()