diff options
Diffstat (limited to 'Swiften/ScreenSharing/IncomingScreenSharing.cpp')
-rw-r--r-- | Swiften/ScreenSharing/IncomingScreenSharing.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Swiften/ScreenSharing/IncomingScreenSharing.cpp b/Swiften/ScreenSharing/IncomingScreenSharing.cpp index 2ddfab9..3807a0f 100644 --- a/Swiften/ScreenSharing/IncomingScreenSharing.cpp +++ b/Swiften/ScreenSharing/IncomingScreenSharing.cpp @@ -45,7 +45,14 @@ void IncomingScreenSharing::cancel() void IncomingScreenSharing::accept() { JingleRawUDPTransportPayload::ref transport = boost::make_shared<JingleRawUDPTransportPayload>(); - addBestCandidate(transport); + if (!addBestCandidate(transport)) { + SWIFT_LOG(error) << "Screen sharing: Unable to listening on any interface" << std::endl; + jingleSession->sendTerminate(JinglePayload::Reason::FailedTransport); + onStateChange(ScreenSharing::Failed); + onFinished(); + return; + } + JingleRTPDescription::ref desc = initialContent->getDescription<JingleRTPDescription>(); if (!desc->getPayloadTypes().empty()) payloadTypeUsed = desc->getPayloadTypes().front(); |