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

Side by Side Diff: src/trusted/plugin/srt_socket.cc

Issue 5622003: Restructure the structs/unions involved in SRPC argument passing. This will... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/trusted/plugin/socket_address.cc ('k') | src/trusted/service_runtime/sel_ldr.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 &params); 66 &params);
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 &params); 79 &params);
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
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 &params); 162 &params);
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 &params)); 173 &params));
174 return rpc_result; 174 return rpc_result;
175 } 175 }
176 176
177 } // namespace plugin 177 } // namespace plugin
OLDNEW
« no previous file with comments | « src/trusted/plugin/socket_address.cc ('k') | src/trusted/service_runtime/sel_ldr.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698