OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Native Client Authors. All rights reserved. | 2 * Copyright 2008 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 | 7 |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "native_client/src/trusted/plugin/srt_socket.h" | 10 #include "native_client/src/trusted/plugin/srt_socket.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 62 } |
63 SrpcParams params; | 63 SrpcParams params; |
64 bool success = connected_socket()->InitParams(kLoadModule, | 64 bool success = connected_socket()->InitParams(kLoadModule, |
65 METHOD_CALL, | 65 METHOD_CALL, |
66 ¶ms); | 66 ¶ms); |
67 if (!success) { | 67 if (!success) { |
68 return false; | 68 return false; |
69 } | 69 } |
70 | 70 |
71 params.ins()[0]->u.hval = desc; | 71 params.ins()[0]->u.hval = desc; |
72 params.ins()[1]->u.sval.str = strdup("place holder"); | 72 params.ins()[1]->arrays.str = strdup("place holder"); |
73 if (NULL == params.ins()[1]->u.sval.str) { | 73 if (NULL == params.ins()[1]->arrays.str) { |
74 return false; | 74 return false; |
75 } | 75 } |
76 | 76 |
77 bool rpc_result = connected_socket()->Invoke(kLoadModule, | 77 bool rpc_result = connected_socket()->Invoke(kLoadModule, |
78 METHOD_CALL, | 78 METHOD_CALL, |
79 ¶ms); | 79 ¶ms); |
80 return rpc_result; | 80 return rpc_result; |
81 } | 81 } |
82 #if NACL_WINDOWS && !defined(NACL_STANDALONE) | 82 #if NACL_WINDOWS && !defined(NACL_STANDALONE) |
83 bool SrtSocket::InitHandlePassing(NaClDesc* desc, | 83 bool SrtSocket::InitHandlePassing(NaClDesc* desc, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 157 } |
158 SrpcParams params; | 158 SrpcParams params; |
159 bool success; | 159 bool success; |
160 success = connected_socket()->InitParams(kLogIdent, | 160 success = connected_socket()->InitParams(kLogIdent, |
161 METHOD_CALL, | 161 METHOD_CALL, |
162 ¶ms); | 162 ¶ms); |
163 if (!success) { | 163 if (!success) { |
164 return false; | 164 return false; |
165 } | 165 } |
166 params.ins()[0]->u.ival = severity; | 166 params.ins()[0]->u.ival = severity; |
167 params.ins()[1]->u.sval.str = strdup(msg.c_str()); | 167 params.ins()[1]->arrays.str = strdup(msg.c_str()); |
168 if (NULL == params.ins()[1]->u.sval.str) { | 168 if (NULL == params.ins()[1]->arrays.str) { |
169 return false; | 169 return false; |
170 } | 170 } |
171 bool rpc_result = (connected_socket()->Invoke(kLogIdent, | 171 bool rpc_result = (connected_socket()->Invoke(kLogIdent, |
172 METHOD_CALL, | 172 METHOD_CALL, |
173 ¶ms)); | 173 ¶ms)); |
174 return rpc_result; | 174 return rpc_result; |
175 } | 175 } |
176 | 176 |
177 } // namespace plugin | 177 } // namespace plugin |
OLD | NEW |