Let the config choose protocol 2 or 3, and fall back for one session only.

The default stays v2. A reflector that refuses that version and names the other gets one session of it, then the station announces the configured protocol again.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-22 16:28:42 +02:00
co-authored by Cursor
parent 3533b97d00
commit 2c621d4b7f
21 changed files with 361 additions and 82 deletions
+2 -1
View File
@@ -41,6 +41,7 @@ func configWithDir(t testing.TB, host string, port int, callsign, authKey string
"callsign": callsign,
"authKey": authKey,
"talkGroup": talkGroup,
"protocol": "v3",
"certificateDir": certDir,
"enableLogging": false,
"logFile": logPath,
@@ -509,7 +510,7 @@ func TestCADigestMismatchIsLoggedAndKept(t *testing.T) {
}
body, err := jsonv2.Marshal(map[string]any{
"host": "127.0.0.1", "port": refl.port, "callsign": "DL1ABC", "authKey": "key",
"talkGroup": 20, "certificateDir": certDir, "enableLogging": true, "logFile": logPath,
"talkGroup": 20, "protocol": "v3", "certificateDir": certDir, "enableLogging": true, "logFile": logPath,
})
if err != nil {
t.Fatal(err)