aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/src/Loop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nxcomp/src/Loop.cpp')
-rw-r--r--nxcomp/src/Loop.cpp24
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();
+ }
}
}