Skip to content

Commit

Permalink
Fixed a couple of stupid ICE related bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed May 31, 2021
1 parent e817b5e commit fc2439b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/xmpp/xmpp-im/jingle-ice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ namespace XMPP { namespace Jingle { namespace ICE {
ExternalService::Ptr turnUdp;
ExternalService::Ptr turnTcp;
for (auto const &s : qAsConst(services)) {
if (s->type == QLatin1String("stun"))
if (s->type == QLatin1String("stun")
&& (s->transport.isEmpty() || s->transport == QLatin1String("udp")))
stun = s;
else if (s->type == QLatin1String("turn")) {
if (s->transport == QLatin1String("tcp"))
Expand Down
2 changes: 1 addition & 1 deletion src/xmpp/xmpp-im/xmpp_externalservicediscovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ void ExternalServiceDiscovery::services(QObject *ctx, ServicesCallback &&callbac
if (types.isEmpty() || types.size() > 1) {
currentTask = new JT_ExternalServiceDiscovery(client_->rootTask());
connect(currentTask, &Task::finished, ctx, [this, types, cb = std::move(callback)]() {
currentTask = nullptr; // it will self-delete anyway
services_ = currentTask->services();
currentTask = nullptr; // it will self-delete anyway
cb(cachedServices(types));
});
currentTask->getServices();
Expand Down

0 comments on commit fc2439b

Please sign in to comment.