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

Side by Side Diff: src/shared/srpc/rpc_service.c

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/shared/srpc/rpc_serialize.c ('k') | src/shared/srpc/rpc_universal.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 (c) 2008 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2008 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 /* 7 /*
8 * Service descriptions. 8 * Service descriptions.
9 */ 9 */
10 10
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 static void ServiceDiscovery(NaClSrpcRpc* rpc, 427 static void ServiceDiscovery(NaClSrpcRpc* rpc,
428 NaClSrpcArg** in_args, 428 NaClSrpcArg** in_args,
429 NaClSrpcArg** out_args, 429 NaClSrpcArg** out_args,
430 NaClSrpcClosure* done) { 430 NaClSrpcClosure* done) {
431 UNREFERENCED_PARAMETER(in_args); 431 UNREFERENCED_PARAMETER(in_args);
432 rpc->result = NACL_SRPC_RESULT_APP_ERROR; 432 rpc->result = NACL_SRPC_RESULT_APP_ERROR;
433 if (NULL == rpc->channel || NULL == rpc->channel->server) { 433 if (NULL == rpc->channel || NULL == rpc->channel->server) {
434 done->Run(done); 434 done->Run(done);
435 return; 435 return;
436 } 436 }
437 if (out_args[0]->u.caval.count >= 437 if (out_args[0]->u.count >= rpc->channel->server->service_string_length) {
438 rpc->channel->server->service_string_length) { 438 strncpy(out_args[0]->arrays.carr,
439 strncpy(out_args[0]->u.caval.carr,
440 rpc->channel->server->service_string, 439 rpc->channel->server->service_string,
441 rpc->channel->server->service_string_length); 440 rpc->channel->server->service_string_length);
442 /* Set the length of the string actually returned. */ 441 /* Set the length of the string actually returned. */
443 out_args[0]->u.caval.count = rpc->channel->server->service_string_length; 442 out_args[0]->u.count = rpc->channel->server->service_string_length;
444 rpc->result = NACL_SRPC_RESULT_OK; 443 rpc->result = NACL_SRPC_RESULT_OK;
445 } 444 }
446 done->Run(done); 445 done->Run(done);
447 } 446 }
OLDNEW
« no previous file with comments | « src/shared/srpc/rpc_serialize.c ('k') | src/shared/srpc/rpc_universal.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698