You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by ms...@apache.org on 2019/12/18 05:30:13 UTC
[incubator-teaclave] branch master updated: Fix compilation warning
(#176)
This is an automated email from the ASF dual-hosted git repository.
mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git
The following commit(s) were added to refs/heads/master by this push:
new b472d0f Fix compilation warning (#176)
b472d0f is described below
commit b472d0f74318825d7194604b45544ef134a2f601
Author: Mingshen Sun <bo...@mssun.me>
AuthorDate: Tue Dec 17 21:30:06 2019 -0800
Fix compilation warning (#176)
---
mesatee_core/src/lib.rs | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/mesatee_core/src/lib.rs b/mesatee_core/src/lib.rs
index 41a92b7..076dc05 100644
--- a/mesatee_core/src/lib.rs
+++ b/mesatee_core/src/lib.rs
@@ -56,14 +56,23 @@ pub mod config;
#[cfg(feature = "mesalock_sgx")]
pub fn init_service(name: &str) -> Result<()> {
+ use std::backtrace;
use teaclave_config::runtime_config;
debug!("Enclave [{}]: Initializing...", name);
env_logger::init();
- #[cfg(debug_assertions)]
- let _ = backtrace::enable_backtrace(format!("{}.enclave.signed.so", name), PrintFormat::Full);
- if runtime_config::is_initialized() {
+ if backtrace::enable_backtrace(
+ format!("{}.enclave.signed.so", name),
+ backtrace::PrintFormat::Full,
+ )
+ .is_err()
+ {
+ error!("Cannot enable backtrace");
+ return Err(Error::from(ErrorKind::ECallError));
+ }
+ if !runtime_config::is_initialized() {
+ error!("Runtime config is not initialized");
return Err(Error::from(ErrorKind::ECallError));
}
crate::rpc::sgx::prelude();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org