Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: remoting/client/plugin/pepper_packet_socket_factory.cc

Issue 10284008: Switch client to Pepper UDP API instead of Transport API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/protocol/connection_to_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_packet_socket_factory.cc
diff --git a/remoting/client/plugin/pepper_packet_socket_factory.cc b/remoting/client/plugin/pepper_packet_socket_factory.cc
index 461571d295543e0dfc357ffb506ed658863b4767..f83180ba8b35747b98f1d86194d174147e3176b6 100644
--- a/remoting/client/plugin/pepper_packet_socket_factory.cc
+++ b/remoting/client/plugin/pepper_packet_socket_factory.cc
@@ -197,7 +197,11 @@ int UdpPacketSocket::Send(const void* data, size_t data_size) {
int UdpPacketSocket::SendTo(const void* data,
size_t data_size,
const talk_base::SocketAddress& address) {
- DCHECK_EQ(state_, STATE_BOUND);
+ if (state_ != STATE_BOUND) {
+ // TODO(sergeyu): StunPort may try to send stun request before we
+ // are bound. Fix that problem and change this to DCHECK.
+ return EINVAL;
+ }
if (error_ != 0) {
return error_;
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/protocol/connection_to_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698