From d68e86910cfb7b3421a2c9555adf6dce20366d9f Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Sat, 13 Feb 2021 21:59:28 +0100 Subject: [PATCH] Add logging for --serverpublicip Also warn when this option is used when not running in server mode or when not registering to a central server. Signed-off-by: Christian Hoffmann --- src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index f47b790150..bd07ad6d19 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -407,6 +407,8 @@ int main ( int argc, char** argv ) strArgument ) ) { strServerPublicIP = strArgument; + qInfo() << qUtf8Printable( QString( "- server public IP: %1" ) + .arg( strServerPublicIP ) ); CommandLineOptions << "--serverpublicip"; continue; } @@ -576,6 +578,11 @@ int main ( int argc, char** argv ) qWarning() << "Mute my own signal in my personal mix is only supported in headless mode."; } + if ( !strServerPublicIP.isEmpty() && ( strCentralServer.isEmpty() || bIsClient ) ) + { + qWarning() << "Server Public IP will only take effect when registering a server with a central server."; + } + // per definition: if we are in "GUI" server mode and no central server // address is given, we use the default central server address if ( !bIsClient && bUseGUI && strCentralServer.isEmpty() )