OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include <assert.h> | 7 #include <assert.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <iterator> | 10 #include <iterator> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // Set up to receive a message. | 63 // Set up to receive a message. |
64 iovec[0].base = bytes.get(); | 64 iovec[0].base = bytes.get(); |
65 iovec[0].length = NACL_ABI_IMC_USER_BYTES_MAX; | 65 iovec[0].length = NACL_ABI_IMC_USER_BYTES_MAX; |
66 header.iov = iovec; | 66 header.iov = iovec; |
67 header.iov_length = NACL_ARRAY_SIZE(iovec); | 67 header.iov_length = NACL_ARRAY_SIZE(iovec); |
68 header.ndescv = descs; | 68 header.ndescv = descs; |
69 header.ndescv_length = NACL_ARRAY_SIZE(descs); | 69 header.ndescv_length = NACL_ARRAY_SIZE(descs); |
70 header.flags = 0; | 70 header.flags = 0; |
71 // Receive the message. | 71 // Receive the message. |
72 if (0 != desc->LowLevelRecvMsg(&header, 0, NULL)) { | 72 if (0 != desc->RecvMsg(&header, 0, NULL)) { |
73 return NULL; | 73 return NULL; |
74 } | 74 } |
75 // Check that there was exactly one descriptor passed. | 75 // Check that there was exactly one descriptor passed. |
76 if (1 != header.ndescv_length) { | 76 if (1 != header.ndescv_length) { |
77 return NULL; | 77 return NULL; |
78 } | 78 } |
79 | 79 |
80 return descs[0]; | 80 return descs[0]; |
81 } | 81 } |
82 | 82 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 bool SelLdrLauncher::Start(int socket_count, | 305 bool SelLdrLauncher::Start(int socket_count, |
306 Handle* result_sockets, | 306 Handle* result_sockets, |
307 const char* url) { | 307 const char* url) { |
308 UNREFERENCED_PARAMETER(socket_count); | 308 UNREFERENCED_PARAMETER(socket_count); |
309 UNREFERENCED_PARAMETER(result_sockets); | 309 UNREFERENCED_PARAMETER(result_sockets); |
310 return Start(url); | 310 return Start(url); |
311 } | 311 } |
312 #endif // defined(NACL_STANDALONE) | 312 #endif // defined(NACL_STANDALONE) |
313 | 313 |
314 } // namespace nacl | 314 } // namespace nacl |
OLD | NEW |