| Index: native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc
|
| diff --git a/native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc b/native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc
|
| index 582286d538e1016732ab272843256047a72f706b..816f8e9a832498ed78f2b312af2617c6d0e6f8b6 100644
|
| --- a/native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc
|
| +++ b/native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc
|
| @@ -9,6 +9,7 @@
|
|
|
| #include <algorithm>
|
|
|
| +#include "nacl_io/log.h"
|
| #include "nacl_io/pepper_interface.h"
|
| #include "nacl_io/socket/packet.h"
|
| #include "nacl_io/socket/udp_event_emitter.h"
|
| @@ -169,13 +170,17 @@ Error UdpNode::Init(int open_flags) {
|
| if (err != 0)
|
| return err;
|
|
|
| - if (UDPInterface() == NULL)
|
| + if (UDPInterface() == NULL) {
|
| + LOG_ERROR("Got NULL interface: UDP");
|
| return EACCES;
|
| + }
|
|
|
| socket_resource_ =
|
| UDPInterface()->Create(filesystem_->ppapi()->GetInstance());
|
| - if (0 == socket_resource_)
|
| + if (0 == socket_resource_) {
|
| + LOG_ERROR("Unable to create UDP resource.");
|
| return EACCES;
|
| + }
|
|
|
| return 0;
|
| }
|
|
|