Chromium Code Reviews| 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 "native_client/src/trusted/service_runtime/nacl_secure_service.h" | 7 #include "native_client/src/trusted/service_runtime/nacl_secure_service.h" |
| 8 | 8 |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 250 static void NaClSecureServiceLogRpc( | 250 static void NaClSecureServiceLogRpc( |
| 251 struct NaClSrpcRpc *rpc, | 251 struct NaClSrpcRpc *rpc, |
| 252 struct NaClSrpcArg **in_args, | 252 struct NaClSrpcArg **in_args, |
| 253 struct NaClSrpcArg **out_args, | 253 struct NaClSrpcArg **out_args, |
| 254 struct NaClSrpcClosure *done_cls) { | 254 struct NaClSrpcClosure *done_cls) { |
| 255 int severity = in_args[0]->u.ival; | 255 int severity = in_args[0]->u.ival; |
| 256 char *msg = in_args[1]->arrays.str; | 256 char *msg = in_args[1]->arrays.str; |
| 257 UNREFERENCED_PARAMETER(out_args); | 257 UNREFERENCED_PARAMETER(out_args); |
| 258 | 258 |
| 259 NaClLog(5, "NaClSecureChannelLogRpc\n"); | 259 NaClLog(5, "NaClSecureChannelLogRpc\n"); |
| 260 if (LOG_FATAL == severity) { | |
|
Mark Seaborn
2015/03/11 01:26:14
Nit: Use the NaCl style for multiline comments, wi
jvoung (off chromium)
2015/03/11 18:02:06
Done.
| |
| 261 /* SRPC is deprecated and the only remaining user of this LogRpc | |
| 262 * corresponds to fairly benign errors. Also, at this point the | |
| 263 * backtraces will not be terribly interesting. Avoid spamming the | |
| 264 * crash report counter for such errors and exit cleanly. | |
| 265 */ | |
| 266 NaClLog(LOG_ERROR, "%s\n", msg); | |
| 267 NaClExit(1); | |
|
Mark Seaborn
2015/03/11 01:26:14
You wrote:
jvoung (off chromium)
2015/03/11 18:02:06
I'm not sure if they are useful. For bad elf heade
| |
| 268 } | |
| 260 NaClLog(severity, "%s\n", msg); | 269 NaClLog(severity, "%s\n", msg); |
| 261 NaClLog(5, "NaClSecureChannelLogRpc\n"); | 270 NaClLog(5, "NaClSecureChannelLogRpc\n"); |
| 262 rpc->result = NACL_SRPC_RESULT_OK; | 271 rpc->result = NACL_SRPC_RESULT_OK; |
| 263 (*done_cls->Run)(done_cls); | 272 (*done_cls->Run)(done_cls); |
| 264 } | 273 } |
| 265 | 274 |
| 266 static void NaClSecureServiceShutdownRpc( | 275 static void NaClSecureServiceShutdownRpc( |
| 267 struct NaClSrpcRpc *rpc, | 276 struct NaClSrpcRpc *rpc, |
| 268 struct NaClSrpcArg **in_args, | 277 struct NaClSrpcArg **in_args, |
| 269 struct NaClSrpcArg **out_args, | 278 struct NaClSrpcArg **out_args, |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 288 | 297 |
| 289 struct NaClSimpleServiceVtbl const kNaClSecureServiceVtbl = { | 298 struct NaClSimpleServiceVtbl const kNaClSecureServiceVtbl = { |
| 290 { | 299 { |
| 291 NaClSecureServiceDtor, | 300 NaClSecureServiceDtor, |
| 292 }, | 301 }, |
| 293 NaClSecureServiceConnectionFactory, | 302 NaClSecureServiceConnectionFactory, |
| 294 NaClSecureServiceAcceptConnection, | 303 NaClSecureServiceAcceptConnection, |
| 295 NaClSimpleServiceAcceptAndSpawnHandler, | 304 NaClSimpleServiceAcceptAndSpawnHandler, |
| 296 NaClSecureServiceRpcHandler, | 305 NaClSecureServiceRpcHandler, |
| 297 }; | 306 }; |
| OLD | NEW |