summaryrefslogtreecommitdiffstats
path: root/jingle/glue
diff options
context:
space:
mode:
Diffstat (limited to 'jingle/glue')
-rw-r--r--jingle/glue/channel_socket_adapter.cc6
-rw-r--r--jingle/glue/channel_socket_adapter_unittest.cc11
-rw-r--r--jingle/glue/fake_socket_factory.cc8
-rw-r--r--jingle/glue/fake_socket_factory.h6
4 files changed, 21 insertions, 10 deletions
diff --git a/jingle/glue/channel_socket_adapter.cc b/jingle/glue/channel_socket_adapter.cc
index 0f68d50..27f0080 100644
--- a/jingle/glue/channel_socket_adapter.cc
+++ b/jingle/glue/channel_socket_adapter.cc
@@ -77,7 +77,8 @@ int TransportChannelSocketAdapter::Write(
int result;
if (channel_->writable()) {
- result = channel_->SendPacket(buffer->data(), buffer_size);
+ result = channel_->SendPacket(buffer->data(), buffer_size,
+ talk_base::DSCP_NO_CHANGE);
if (result < 0) {
result = net::MapSystemError(channel_->GetError());
@@ -171,7 +172,8 @@ void TransportChannelSocketAdapter::OnWritableState(
// Try to send the packet if there is a pending write.
if (!write_callback_.is_null()) {
int result = channel_->SendPacket(write_buffer_->data(),
- write_buffer_size_);
+ write_buffer_size_,
+ talk_base::DSCP_NO_CHANGE);
if (result < 0)
result = net::MapSystemError(channel_->GetError());
diff --git a/jingle/glue/channel_socket_adapter_unittest.cc b/jingle/glue/channel_socket_adapter_unittest.cc
index 32aa7cc..580a34d 100644
--- a/jingle/glue/channel_socket_adapter_unittest.cc
+++ b/jingle/glue/channel_socket_adapter_unittest.cc
@@ -34,7 +34,10 @@ class MockTransportChannel : public cricket::TransportChannel {
set_readable(true);
}
- MOCK_METHOD3(SendPacket, int(const char* data, size_t len, int flags));
+ MOCK_METHOD4(SendPacket, int(const char* data,
+ size_t len,
+ talk_base::DiffServCodePoint dscp,
+ int flags));
MOCK_METHOD2(SetOption, int(talk_base::Socket::Option opt, int value));
MOCK_METHOD0(GetError, int());
MOCK_CONST_METHOD0(GetIceRole, cricket::IceRole());
@@ -104,7 +107,8 @@ TEST_F(TransportChannelSocketAdapterTest, ReadClose) {
TEST_F(TransportChannelSocketAdapterTest, Write) {
scoped_refptr<IOBuffer> buffer(new IOBuffer(kTestDataSize));
- EXPECT_CALL(channel_, SendPacket(buffer->data(), kTestDataSize, 0))
+ EXPECT_CALL(channel_, SendPacket(buffer->data(), kTestDataSize,
+ talk_base::DSCP_NO_CHANGE, 0))
.WillOnce(Return(kTestDataSize));
int result = target_->Write(buffer.get(), kTestDataSize, callback_);
@@ -116,7 +120,8 @@ TEST_F(TransportChannelSocketAdapterTest, Write) {
TEST_F(TransportChannelSocketAdapterTest, WritePending) {
scoped_refptr<IOBuffer> buffer(new IOBuffer(kTestDataSize));
- EXPECT_CALL(channel_, SendPacket(buffer->data(), kTestDataSize, 0))
+ EXPECT_CALL(channel_, SendPacket(buffer->data(), kTestDataSize,
+ talk_base::DSCP_NO_CHANGE, 0))
.Times(1)
.WillOnce(Return(SOCKET_ERROR));
diff --git a/jingle/glue/fake_socket_factory.cc b/jingle/glue/fake_socket_factory.cc
index c5465a6f..823367f 100644
--- a/jingle/glue/fake_socket_factory.cc
+++ b/jingle/glue/fake_socket_factory.cc
@@ -33,13 +33,15 @@ talk_base::SocketAddress FakeUDPPacketSocket::GetRemoteAddress() const {
return remote_address_;
}
-int FakeUDPPacketSocket::Send(const void *data, size_t data_size) {
+int FakeUDPPacketSocket::Send(const void *data, size_t data_size,
+ talk_base::DiffServCodePoint dscp) {
DCHECK(CalledOnValidThread());
- return SendTo(data, data_size, remote_address_);
+ return SendTo(data, data_size, remote_address_, dscp);
}
int FakeUDPPacketSocket::SendTo(const void *data, size_t data_size,
- const talk_base::SocketAddress& address) {
+ const talk_base::SocketAddress& address,
+ talk_base::DiffServCodePoint dscp) {
DCHECK(CalledOnValidThread());
if (state_ == IS_CLOSED) {
diff --git a/jingle/glue/fake_socket_factory.h b/jingle/glue/fake_socket_factory.h
index cb56a3c..e9af78d 100644
--- a/jingle/glue/fake_socket_factory.h
+++ b/jingle/glue/fake_socket_factory.h
@@ -38,9 +38,11 @@ class FakeUDPPacketSocket : public talk_base::AsyncPacketSocket,
// talk_base::AsyncPacketSocket implementation.
virtual talk_base::SocketAddress GetLocalAddress() const OVERRIDE;
virtual talk_base::SocketAddress GetRemoteAddress() const OVERRIDE;
- virtual int Send(const void *pv, size_t cb) OVERRIDE;
+ virtual int Send(const void *pv, size_t cb,
+ talk_base::DiffServCodePoint dscp) OVERRIDE;
virtual int SendTo(const void *pv, size_t cb,
- const talk_base::SocketAddress& addr) OVERRIDE;
+ const talk_base::SocketAddress& addr,
+ talk_base::DiffServCodePoint dscp) OVERRIDE;
virtual int Close() OVERRIDE;
virtual State GetState() const OVERRIDE;
virtual int GetOption(talk_base::Socket::Option opt, int* value) OVERRIDE;