Browse Source

Cleaned up includes in sctptransport.hpp

Paul-Louis Ageneau 4 years ago
parent
commit
38e1a946b0
3 changed files with 5 additions and 4 deletions
  1. 1 0
      src/impl/datachannel.hpp
  2. 4 2
      src/impl/sctptransport.cpp
  3. 0 2
      src/impl/sctptransport.hpp

+ 1 - 0
src/impl/datachannel.hpp

@@ -28,6 +28,7 @@
 #include "sctptransport.hpp"
 
 #include <atomic>
+#include <shared_mutex>
 
 namespace rtc::impl {
 

+ 4 - 2
src/impl/sctptransport.cpp

@@ -25,7 +25,9 @@
 #include <exception>
 #include <iostream>
 #include <limits>
+#include <shared_mutex>
 #include <thread>
+#include <unordered_set>
 #include <vector>
 
 // RFC 8831: SCTP MUST support performing Path MTU discovery without relying on ICMP or ICMPv6 as
@@ -880,7 +882,7 @@ optional<milliseconds> SctpTransport::rtt() {
 void SctpTransport::UpcallCallback(struct socket *, void *arg, int /* flags */) {
 	auto *transport = static_cast<SctpTransport *>(arg);
 
-	if(auto lock = Instances->lock(transport))
+	if (auto lock = Instances->lock(transport))
 		transport->handleUpcall();
 }
 
@@ -889,7 +891,7 @@ int SctpTransport::WriteCallback(void *ptr, void *data, size_t len, uint8_t tos,
 
 	// Workaround for sctplab/usrsctp#405: Send callback is invoked on already closed socket
 	// https://github.com/sctplab/usrsctp/issues/405
-	if(auto lock = Instances->lock(transport))
+	if (auto lock = Instances->lock(transport))
 		return transport->handleWrite(static_cast<byte *>(data), len, tos, set_df);
 	else
 		return -1;

+ 0 - 2
src/impl/sctptransport.hpp

@@ -29,8 +29,6 @@
 #include <functional>
 #include <map>
 #include <mutex>
-#include <shared_mutex>
-#include <unordered_set>
 
 #include "usrsctp.h"