Prefix HAVE_SCTP macro with WEBRTC_.
Generated automatically with:
git grep -l "\bHAVE_SCTP\b" | xargs \
sed -i '' 's/HAVE_SCTP/WEBRTC_HAVE_SCTP/g'
Bug: webrtc:11142
Change-Id: I30e16a40ca7a7e388940191df22b705265b42cb4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202251
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33042}
diff --git a/pc/BUILD.gn b/pc/BUILD.gn
index 0155bc7..bf12e8d 100644
--- a/pc/BUILD.gn
+++ b/pc/BUILD.gn
@@ -19,7 +19,7 @@
config("rtc_pc_config") {
defines = []
if (rtc_enable_sctp) {
- defines += [ "HAVE_SCTP" ]
+ defines += [ "WEBRTC_HAVE_SCTP" ]
}
}
@@ -1031,7 +1031,7 @@
]
if (rtc_enable_sctp) {
- defines = [ "HAVE_SCTP" ]
+ defines = [ "WEBRTC_HAVE_SCTP" ]
}
deps = [
diff --git a/pc/connection_context.cc b/pc/connection_context.cc
index 727fbd6..5f9dcb9 100644
--- a/pc/connection_context.cc
+++ b/pc/connection_context.cc
@@ -63,7 +63,7 @@
if (factory) {
return factory;
}
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
return std::make_unique<cricket::SctpTransportFactory>(network_thread);
#else
return nullptr;
diff --git a/pc/peer_connection_bundle_unittest.cc b/pc/peer_connection_bundle_unittest.cc
index c544db3..2d8338b 100644
--- a/pc/peer_connection_bundle_unittest.cc
+++ b/pc/peer_connection_bundle_unittest.cc
@@ -755,7 +755,7 @@
// (https://bugs.chromium.org/p/chromium/issues/detail?id=827917)
TEST_P(PeerConnectionBundleTest, RemovingContentAndRejectBundleGroup) {
RTCConfiguration config;
-#ifndef HAVE_SCTP
+#ifndef WEBRTC_HAVE_SCTP
config.enable_rtp_data_channel = true;
#endif
config.bundle_policy = BundlePolicy::kBundlePolicyMaxBundle;
diff --git a/pc/peer_connection_end_to_end_unittest.cc b/pc/peer_connection_end_to_end_unittest.cc
index 24ef69c..b29371c 100644
--- a/pc/peer_connection_end_to_end_unittest.cc
+++ b/pc/peer_connection_end_to_end_unittest.cc
@@ -465,7 +465,7 @@
EXPECT_NE(encoder_id1, encoder_id2);
}
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
// Verifies that a DataChannel created before the negotiation can transition to
// "OPEN" and transfer data.
TEST_P(PeerConnectionEndToEndTest, CreateDataChannelBeforeNegotiate) {
@@ -735,7 +735,7 @@
channels[cricket::kMaxSctpStreams / 2]->state());
}
-#endif // HAVE_SCTP
+#endif // WEBRTC_HAVE_SCTP
TEST_P(PeerConnectionEndToEndTest, CanRestartIce) {
rtc::scoped_refptr<webrtc::AudioDecoderFactory> real_decoder_factory =
diff --git a/pc/peer_connection_histogram_unittest.cc b/pc/peer_connection_histogram_unittest.cc
index 39b9a73..97fbde2 100644
--- a/pc/peer_connection_histogram_unittest.cc
+++ b/pc/peer_connection_histogram_unittest.cc
@@ -497,7 +497,7 @@
expected_fingerprint_callee));
}
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
TEST_F(PeerConnectionUsageHistogramTest, FingerprintDataOnly) {
auto caller = CreatePeerConnection();
auto callee = CreatePeerConnection();
@@ -521,7 +521,7 @@
expected_fingerprint |
static_cast<int>(UsageEvent::PRIVATE_CANDIDATE_COLLECTED)) == 2);
}
-#endif // HAVE_SCTP
+#endif // WEBRTC_HAVE_SCTP
#endif // WEBRTC_ANDROID
TEST_F(PeerConnectionUsageHistogramTest, FingerprintStunTurn) {
@@ -628,7 +628,7 @@
}
#ifndef WEBRTC_ANDROID
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
// Test that the usage pattern bits for adding remote (private IPv6) candidates
// are set when the remote candidates are retrieved from the Offer SDP instead
// of trickled ICE messages.
diff --git a/pc/peer_connection_integrationtest.cc b/pc/peer_connection_integrationtest.cc
index a784126..0005552 100644
--- a/pc/peer_connection_integrationtest.cc
+++ b/pc/peer_connection_integrationtest.cc
@@ -3705,7 +3705,7 @@
kDefaultTimeout);
}
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
// This test sets up a call between two parties with audio, video and an SCTP
// data channel.
@@ -3931,7 +3931,7 @@
kDefaultTimeout);
}
-#endif // HAVE_SCTP
+#endif // WEBRTC_HAVE_SCTP
// Test that the ICE connection and gathering states eventually reach
// "complete".
@@ -5188,7 +5188,7 @@
ASSERT_TRUE(CreatePeerConnectionWrappers());
ConnectFakeSignaling();
caller()->AddAudioVideoTracks();
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
caller()->CreateDataChannel();
#endif
caller()->CreateAndSetAndSignalOffer();
@@ -5208,7 +5208,7 @@
// Test that transport stats are generated by the RTCStatsCollector for a
// connection that only involves data channels. This is a regression test for
// crbug.com/826972.
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
TEST_P(PeerConnectionIntegrationTest,
TransportStatsReportedForDataChannelOnlyConnection) {
ASSERT_TRUE(CreatePeerConnectionWrappers());
@@ -5224,7 +5224,7 @@
auto callee_report = callee()->NewGetStats();
EXPECT_EQ(1u, callee_report->GetStatsOfType<RTCTransportStats>().size());
}
-#endif // HAVE_SCTP
+#endif // WEBRTC_HAVE_SCTP
TEST_P(PeerConnectionIntegrationTest,
IceEventsGeneratedAndLoggedInRtcEventLog) {
@@ -5910,7 +5910,7 @@
callee_track->state());
}
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
TEST_F(PeerConnectionIntegrationTestUnifiedPlan,
EndToEndCallWithBundledSctpDataChannel) {
@@ -5978,7 +5978,7 @@
ASSERT_TRUE_WAIT(!callee()->data_observer()->IsOpen(), kDefaultTimeout);
}
-#endif // HAVE_SCTP
+#endif // WEBRTC_HAVE_SCTP
} // namespace
} // namespace webrtc
diff --git a/pc/peer_connection_interface_unittest.cc b/pc/peer_connection_interface_unittest.cc
index b7be44d..505fe6b 100644
--- a/pc/peer_connection_interface_unittest.cc
+++ b/pc/peer_connection_interface_unittest.cc
@@ -2255,7 +2255,7 @@
EXPECT_EQ(DataChannelInterface::kClosed, offer_channel->state());
}
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
// This tests that SCTP data channels can be rejected in an answer.
TEST_P(PeerConnectionInterfaceTest, TestRejectSctpDataChannelInAnswer)
#else
@@ -2310,7 +2310,7 @@
cricket::GetFirstVideoContent(pc_->local_description()->description());
ASSERT_TRUE(content != NULL);
EXPECT_FALSE(content->rejected);
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
content =
cricket::GetFirstDataContent(pc_->local_description()->description());
ASSERT_TRUE(content != NULL);
@@ -3593,12 +3593,12 @@
// Test that negotiation can succeed with a data channel only, and with the max
// bundle policy. Previously there was a bug that prevented this.
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
TEST_P(PeerConnectionInterfaceTest, DataChannelOnlyOfferWithMaxBundlePolicy) {
#else
TEST_P(PeerConnectionInterfaceTest,
DISABLED_DataChannelOnlyOfferWithMaxBundlePolicy) {
-#endif // HAVE_SCTP
+#endif // WEBRTC_HAVE_SCTP
PeerConnectionInterface::RTCConfiguration config;
config.bundle_policy = PeerConnectionInterface::kBundlePolicyMaxBundle;
CreatePeerConnection(config);
diff --git a/pc/peer_connection_rtp_unittest.cc b/pc/peer_connection_rtp_unittest.cc
index 4d6da66..3614f0c 100644
--- a/pc/peer_connection_rtp_unittest.cc
+++ b/pc/peer_connection_rtp_unittest.cc
@@ -1844,7 +1844,7 @@
class SdpFormatReceivedTest : public PeerConnectionRtpTestUnifiedPlan {};
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
TEST_F(SdpFormatReceivedTest, DataChannelOnlyIsReportedAsNoTracks) {
auto caller = CreatePeerConnectionWithUnifiedPlan();
caller->CreateDataChannel("dc");
@@ -1856,7 +1856,7 @@
metrics::Samples("WebRTC.PeerConnection.SdpFormatReceived"),
ElementsAre(Pair(kSdpFormatReceivedNoTracks, 1)));
}
-#endif // HAVE_SCTP
+#endif // WEBRTC_HAVE_SCTP
TEST_F(SdpFormatReceivedTest, SimpleUnifiedPlanIsReportedAsSimple) {
auto caller = CreatePeerConnectionWithUnifiedPlan();
diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc
index ee68ec9..e2d7c35 100644
--- a/pc/rtc_stats_integrationtest.cc
+++ b/pc/rtc_stats_integrationtest.cc
@@ -1091,7 +1091,7 @@
rtc::scoped_refptr<const RTCStatsReport> report_;
};
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
TEST_F(RTCStatsIntegrationTest, GetStatsFromCaller) {
StartCall();
@@ -1254,7 +1254,7 @@
}
}
}
-#endif // HAVE_SCTP
+#endif // WEBRTC_HAVE_SCTP
} // namespace
diff --git a/pc/test/test_sdp_strings.h b/pc/test/test_sdp_strings.h
index 849757d..6394ac5 100644
--- a/pc/test/test_sdp_strings.h
+++ b/pc/test/test_sdp_strings.h
@@ -60,7 +60,7 @@
"a=candidate:4 2 UDP 2113667326 10.0.254.2 58890 typ host\r\n"
"a=candidate:5 2 UDP 1694302206 74.95.2.170 33611 typ srflx raddr"
" 10.0.254.2 rport 58890\r\n"
-#ifdef HAVE_SCTP
+#ifdef WEBRTC_HAVE_SCTP
"m=application 45536 DTLS/SCTP 5000\r\n"
"c=IN IP4 74.95.2.170\r\n"
"a=fmtp:5000 protocol=webrtc-datachannel;streams=16\r\n"