Переглянути джерело

Fixed spelling negociated -> negotiated

Paul-Louis Ageneau 4 роки тому
батько
коміт
eb61f6cb3c

+ 1 - 1
include/rtc/peerconnection.hpp

@@ -52,7 +52,7 @@ using future_certificate_ptr = std::shared_future<certificate_ptr>;
 
 struct DataChannelInit {
 	Reliability reliability = {};
-	bool negociated = false;
+	bool negotiated = false;
 	std::optional<uint16_t> id = nullopt;
 	string protocol = "";
 };

+ 1 - 1
include/rtc/rtc.h

@@ -100,7 +100,7 @@ typedef struct {
 typedef struct {
 	rtcReliability reliability;
 	const char *protocol; // empty string if NULL
-	bool negociated;
+	bool negotiated;
 	bool manualId;
 	uint16_t id; // ignored if manualId is false
 } rtcDataChannelInit;

+ 1 - 1
src/capi.cpp

@@ -326,7 +326,7 @@ int rtcAddDataChannelExt(int pc, const char *label, const rtcDataChannelInit *in
 				dci.reliability.type = Reliability::Type::Reliable;
 			}
 
-			dci.negociated = init->negociated;
+			dci.negotiated = init->negotiated;
 			dci.id = init->manualId ? std::make_optional(init->id) : nullopt;
 			dci.protocol = init->protocol ? init->protocol : "";
 		}

+ 1 - 1
src/datachannel.cpp

@@ -170,7 +170,7 @@ void DataChannel::open(shared_ptr<SctpTransport> transport) {
 }
 
 void DataChannel::processOpenMessage(message_ptr) {
-	PLOG_WARNING << "Received an open message for a user-negociated DataChannel, ignoring";
+	PLOG_WARNING << "Received an open message for a user-negotiated DataChannel, ignoring";
 }
 
 bool DataChannel::outgoing(message_ptr message) {

+ 2 - 2
src/peerconnection.cpp

@@ -751,9 +751,9 @@ shared_ptr<DataChannel> PeerConnection::emplaceDataChannel(Description::Role rol
 			stream += 2;
 		}
 	}
-	// If the DataChannel is user-negociated, do not negociate it here
+	// If the DataChannel is user-negotiated, do not negociate it here
 	auto channel =
-	    init.negociated
+	    init.negotiated
 	        ? std::make_shared<DataChannel>(shared_from_this(), stream, std::move(label),
 	                                        std::move(init.protocol), std::move(init.reliability))
 	        : std::make_shared<NegociatedDataChannel>(shared_from_this(), stream, std::move(label),

+ 7 - 7
test/connectivity.cpp

@@ -211,25 +211,25 @@ void test_connectivity() {
 	if (!asecond2 || !asecond2->isOpen() || !second1->isOpen())
 		throw runtime_error("Second DataChannel is not open");
 
-	// Try to open a negociated channel
+	// Try to open a negotiated channel
 	DataChannelInit init;
-	init.negociated = true;
+	init.negotiated = true;
 	init.id = 42;
-	auto negociated1 = pc1->createDataChannel("negociated", init);
-	auto negociated2 = pc2->createDataChannel("negoctated", init);
+	auto negotiated1 = pc1->createDataChannel("negotiated", init);
+	auto negotiated2 = pc2->createDataChannel("negoctated", init);
 
-	if (!negociated1->isOpen() || !negociated2->isOpen())
+	if (!negotiated1->isOpen() || !negotiated2->isOpen())
 		throw runtime_error("Negociated DataChannel is not open");
 
 	std::atomic<bool> received = false;
-	negociated2->onMessage([&received](const variant<binary, string> &message) {
+	negotiated2->onMessage([&received](const variant<binary, string> &message) {
 		if (holds_alternative<string>(message)) {
 			cout << "Second Message 2: " << get<string>(message) << endl;
 			received = true;
 		}
 	});
 
-	negociated1->send("Hello from negociated channel");
+	negotiated1->send("Hello from negotiated channel");
 
 	// Wait a bit
 	attempts = 5;

+ 1 - 1
test/track.cpp

@@ -133,7 +133,7 @@ void test_track() {
 		this_thread::sleep_for(1s);
 
 	if (!at2 || !at2->isOpen() || !t1->isOpen())
-		throw runtime_error("Renegociated track is not open");
+		throw runtime_error("Renegotiated track is not open");
 
 	// TODO: Test sending RTP packets in track