summaryrefslogtreecommitdiff
path: root/qt4/TelepathyQt4
diff options
context:
space:
mode:
authorOlli Salli <ollisal@gmail.com>2011-09-13 14:13:47 +0300
committerOlli Salli <ollisal@gmail.com>2011-10-10 19:17:42 +0300
commit56a077fa7e0ffd00e5009239bacf059d303aa909 (patch)
treeed3f90378975b19afb21cfb3265b83ea3e7e3fd1 /qt4/TelepathyQt4
parent1d1e6720ccafb6ead38ccecb4ef080c59e2791ed (diff)
Make it possible for STS to have an empty filter, and a checkable error for STC to have an empty one
Diffstat (limited to 'qt4/TelepathyQt4')
-rw-r--r--qt4/TelepathyQt4/simple-stream-tube-handler.cpp2
-rw-r--r--qt4/TelepathyQt4/stream-tube-client.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/qt4/TelepathyQt4/simple-stream-tube-handler.cpp b/qt4/TelepathyQt4/simple-stream-tube-handler.cpp
index 7e06e71d9..c5b1c5fb8 100644
--- a/qt4/TelepathyQt4/simple-stream-tube-handler.cpp
+++ b/qt4/TelepathyQt4/simple-stream-tube-handler.cpp
@@ -40,8 +40,6 @@ namespace
ChannelClassSpecList buildFilter(const QStringList &p2pServices,
const QStringList &roomServices, bool requested)
{
- Q_ASSERT(!p2pServices.isEmpty() || !roomServices.isEmpty());
-
ChannelClassSpecList filter;
foreach (const QString &service, p2pServices)
diff --git a/qt4/TelepathyQt4/stream-tube-client.cpp b/qt4/TelepathyQt4/stream-tube-client.cpp
index 4dad023f6..ae50ebd7a 100644
--- a/qt4/TelepathyQt4/stream-tube-client.cpp
+++ b/qt4/TelepathyQt4/stream-tube-client.cpp
@@ -237,6 +237,11 @@ StreamTubeClientPtr StreamTubeClient::create(
bool monitorConnections,
bool bypassApproval)
{
+ if (p2pServices.isEmpty() && roomServices.isEmpty()) {
+ warning() << "Tried to create a StreamTubeClient with no services, returning NULL";
+ return StreamTubeClientPtr();
+ }
+
return StreamTubeClientPtr(
new StreamTubeClient(registrar, p2pServices, roomServices, clientName,
monitorConnections, bypassApproval));