Unverified Commit 13041f5c authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'theqvd-media_argument_bugfix' into 3.6.x

parents 17ae45e0 f2c73bd8
...@@ -312,6 +312,11 @@ ChannelEndPoint::enabled() const { ...@@ -312,6 +312,11 @@ ChannelEndPoint::enabled() const {
} }
bool bool
ChannelEndPoint::configured() const {
return ( spec_ && ( strcmp(spec_, "0") != 0) );
}
bool
ChannelEndPoint::validateSpec() { ChannelEndPoint::validateSpec() {
isTCP_ = getTCPHostAndPort(); isTCP_ = getTCPHostAndPort();
isUnix_ = getUnixPath(); isUnix_ = getUnixPath();
......
...@@ -46,6 +46,7 @@ class ChannelEndPoint ...@@ -46,6 +46,7 @@ class ChannelEndPoint
~ChannelEndPoint(); ~ChannelEndPoint();
ChannelEndPoint &operator=(const ChannelEndPoint &other); ChannelEndPoint &operator=(const ChannelEndPoint &other);
bool configured() const;
bool enabled() const; bool enabled() const;
bool disabled() { return !enabled(); } bool disabled() { return !enabled(); }
void disable(); void disable();
......
...@@ -11746,12 +11746,13 @@ int SetPorts() ...@@ -11746,12 +11746,13 @@ int SetPorts()
<< logofs_flush; << logofs_flush;
#endif #endif
if ( mediaPort.configured() ) {
if (control -> ProxyMode == proxy_client) { if (control -> ProxyMode == proxy_client) {
mediaPort.setDefaultTCPPort(DEFAULT_NX_MEDIA_PORT_OFFSET + proxyPort); mediaPort.setDefaultTCPPort(DEFAULT_NX_MEDIA_PORT_OFFSET + proxyPort);
useMediaSocket = mediaPort.enabled(); useMediaSocket = mediaPort.enabled();
} else { } else {
if ( !mediaPort.enabled() ) { if ( mediaPort.getTCPPort() < 0 ) {
#ifdef PANIC #ifdef PANIC
*logofs << "Loop: PANIC! No port specified for multimedia connections.\n" *logofs << "Loop: PANIC! No port specified for multimedia connections.\n"
<< logofs_flush; << logofs_flush;
...@@ -11762,6 +11763,7 @@ int SetPorts() ...@@ -11762,6 +11763,7 @@ int SetPorts()
HandleCleanup(); HandleCleanup();
} }
} }
}
#ifdef TEST #ifdef TEST
*logofs << "Loop: Using multimedia port '" << mediaPort *logofs << "Loop: Using multimedia port '" << mediaPort
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment