OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2015 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 "native_client/src/shared/platform/nacl_log.h" | 7 #include "native_client/src/shared/platform/nacl_log.h" |
8 #include "native_client/src/shared/srpc/nacl_srpc.h" | 8 #include "native_client/src/shared/srpc/nacl_srpc.h" |
9 #include "native_client/src/untrusted/irt/irt_dev.h" | 9 #include "native_client/src/untrusted/irt/irt_dev.h" |
10 #include "native_client/src/untrusted/irt/irt_interfaces.h" | 10 #include "native_client/src/untrusted/irt/irt_interfaces.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 { NULL, NULL }, | 41 { NULL, NULL }, |
42 }; | 42 }; |
43 | 43 |
44 static void serve_link_request(int (*func)(int nexe_fd, | 44 static void serve_link_request(int (*func)(int nexe_fd, |
45 const int *obj_file_fds, | 45 const int *obj_file_fds, |
46 int obj_file_fd_count)) { | 46 int obj_file_fd_count)) { |
47 g_func = func; | 47 g_func = func; |
48 if (!NaClSrpcModuleInit()) { | 48 if (!NaClSrpcModuleInit()) { |
49 NaClLog(LOG_FATAL, "NaClSrpcModuleInit() failed\n"); | 49 NaClLog(LOG_FATAL, "NaClSrpcModuleInit() failed\n"); |
50 } | 50 } |
51 NaClSrpcAcceptClientConnection(srpc_methods); | 51 if (!NaClSrpcAcceptClientConnection(srpc_methods)) { |
| 52 NaClLog(LOG_FATAL, "NaClSrpcAcceptClientConnection() failed\n"); |
| 53 } |
52 } | 54 } |
53 | 55 |
54 const struct nacl_irt_private_pnacl_translator_link | 56 const struct nacl_irt_private_pnacl_translator_link |
55 nacl_irt_private_pnacl_translator_link = { | 57 nacl_irt_private_pnacl_translator_link = { |
56 serve_link_request, | 58 serve_link_request, |
57 }; | 59 }; |
OLD | NEW |