diff options
Diffstat (limited to 'cast/sender/channel')
-rw-r--r-- | cast/sender/channel/sender_socket_factory.cc | 8 | ||||
-rw-r--r-- | cast/sender/channel/sender_socket_factory.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/cast/sender/channel/sender_socket_factory.cc b/cast/sender/channel/sender_socket_factory.cc index 8259685f..b2b036b1 100644 --- a/cast/sender/channel/sender_socket_factory.cc +++ b/cast/sender/channel/sender_socket_factory.cc @@ -17,11 +17,11 @@ namespace openscreen { namespace cast { bool operator<(const std::unique_ptr<SenderSocketFactory::PendingAuth>& a, - int32_t b) { + int b) { return a && a->socket->socket_id() < b; } -bool operator<(int32_t a, +bool operator<(int a, const std::unique_ptr<SenderSocketFactory::PendingAuth>& b) { return b && a < b->socket->socket_id(); } @@ -81,8 +81,8 @@ void SenderSocketFactory::OnConnected( return; } - auto socket = MakeSerialDelete<CastSocket>( - task_runner_, std::move(connection), this, GetNextSocketId()); + auto socket = + MakeSerialDelete<CastSocket>(task_runner_, std::move(connection), this); pending_auth_.emplace_back( new PendingAuth{endpoint, media_policy, std::move(socket), client, AuthContext::Create(), std::move(peer_cert.value())}); diff --git a/cast/sender/channel/sender_socket_factory.h b/cast/sender/channel/sender_socket_factory.h index 4b867e2c..7c788536 100644 --- a/cast/sender/channel/sender_socket_factory.h +++ b/cast/sender/channel/sender_socket_factory.h @@ -86,8 +86,8 @@ class SenderSocketFactory final : public TlsConnectionFactory::Client, bssl::UniquePtr<X509> peer_cert; }; - friend bool operator<(const std::unique_ptr<PendingAuth>& a, int32_t b); - friend bool operator<(int32_t a, const std::unique_ptr<PendingAuth>& b); + friend bool operator<(const std::unique_ptr<PendingAuth>& a, int b); + friend bool operator<(int a, const std::unique_ptr<PendingAuth>& b); std::vector<PendingConnection>::iterator FindPendingConnection( const IPEndpoint& endpoint); |