diff options
author | Vadim Troshchinskiy <vtroshchinskiy@qindel.com> | 2017-10-10 13:04:08 +0200 |
---|---|---|
committer | Vadim Troshchinskiy <vtroshchinskiy@qindel.com> | 2017-10-10 15:15:32 +0200 |
commit | f2c73bd845c2f07c4194f438ef4ce8bbe249bf40 (patch) | |
tree | 146fcc00287144aa47ed27a5e8d4aa7f4be64588 /nxcomp/src/Loop.cpp | |
parent | 17ae45e0fd5a5574d5175657d8ce901ce79f2379 (diff) | |
download | nx-libs-f2c73bd845c2f07c4194f438ef4ce8bbe249bf40.tar.gz nx-libs-f2c73bd845c2f07c4194f438ef4ce8bbe249bf40.tar.bz2 nx-libs-f2c73bd845c2f07c4194f438ef4ce8bbe249bf40.zip |
Fix bug #525: PANIC! No port specified for multimedia connections
Commit 5f1eb0dc3eb89e84a3b146975e147b995fb7673f introduced a regression
that made the use of the multimedia port mandatory.
Fixes ArcticaProject/nx-libs#525
Diffstat (limited to 'nxcomp/src/Loop.cpp')
-rw-r--r-- | nxcomp/src/Loop.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp index f76c22dea..4292e7b9a 100644 --- a/nxcomp/src/Loop.cpp +++ b/nxcomp/src/Loop.cpp @@ -11746,20 +11746,22 @@ int SetPorts() << logofs_flush; #endif - if (control -> ProxyMode == proxy_client) { - mediaPort.setDefaultTCPPort(DEFAULT_NX_MEDIA_PORT_OFFSET + proxyPort); - useMediaSocket = mediaPort.enabled(); - } else { + if ( mediaPort.configured() ) { + if (control -> ProxyMode == proxy_client) { + mediaPort.setDefaultTCPPort(DEFAULT_NX_MEDIA_PORT_OFFSET + proxyPort); + useMediaSocket = mediaPort.enabled(); + } else { - if ( !mediaPort.enabled() ) { - #ifdef PANIC - *logofs << "Loop: PANIC! No port specified for multimedia connections.\n" - << logofs_flush; - #endif + if ( mediaPort.getTCPPort() < 0 ) { + #ifdef PANIC + *logofs << "Loop: PANIC! No port specified for multimedia connections.\n" + << logofs_flush; + #endif - cerr << "Error" << ": No port specified for multimedia connections.\n"; + cerr << "Error" << ": No port specified for multimedia connections.\n"; - HandleCleanup(); + HandleCleanup(); + } } } |