ivila commented on code in PR #221:
URL: 
https://github.com/apache/incubator-teaclave-trustzone-sdk/pull/221#discussion_r2281194802


##########
examples/tls_server-rs/ta/src/main.rs:
##########
@@ -63,104 +65,183 @@ fn invoke_command(cmd_id: u32, params: &mut Parameters) 
-> Result<()> {
     match Command::from(cmd_id) {
         Command::NewTlsSession => {
             trace_println!("[+] new_tls_session");
-            new_tls_session(session_id);
-            Ok(())
+            match new_tls_session(session_id) {
+                Ok(_) => Ok(()),
+                Err(e) => {
+                    trace_println!("[-] Failed to create TLS session: {:?}", 
e);
+                    Err(Error::new(ErrorKind::Generic))
+                }
+            }
         }
         Command::DoTlsRead => {
             let mut p1 = unsafe { params.1.as_memref().unwrap() };

Review Comment:
   Can we remove the `unwrap` here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to