From 3fc5635bfd8fa6a03aa2f38bb69d2465f31f0e24 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 21 May 2009 13:10:56 +0200 Subject: [PATCH] Added error checking of deserialization in skeletons --- TODO | 2 -- forb-idl/forb-idl-c-skels.c | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index bf1e9f9..8c14cc8 100644 --- a/TODO +++ b/TODO @@ -3,8 +3,6 @@ * More flexible handling of log messages (dynamic registration, parsing of command line parameters). -* Error checking of deserialization in skeletons - * Add FNA as transport protocol (probably with some reliable protocol on top of FNA) diff --git a/forb-idl/forb-idl-c-skels.c b/forb-idl/forb-idl-c-skels.c index 12bd674..1d35338 100644 --- a/forb-idl/forb-idl-c-skels.c +++ b/forb-idl/forb-idl-c-skels.c @@ -316,10 +316,10 @@ static void ck_output_op_skel(IDL_tree op, char *intf_id, OIDL_Run_Info *rinfo, role = oidl_attr_to_paramrole(IDL_PARAM_DCL(parm).attr); if (role == DATA_IN || role == DATA_INOUT) { char *name = IDL_IDENT(IDL_PARAM_DCL(parm).simple_declarator).str; - fprintf(ci->fh, /* " r = " */ " "); + fprintf(ci->fh, " if (!"); forb_cbe_write_typespec(ci->fh, IDL_PARAM_DCL(parm).param_type_spec); - fprintf(ci->fh, "_deserialize(cin, &%s);\n", name); -/* fprintf(ci->fh, " if (!r) { ev->major = FORB_EX_IMP_LIMIT; goto exception; }\n"); */ + fprintf(ci->fh, "_deserialize(cin, &%s)) {\n", name); + fprintf(ci->fh, " env->major = FORB_EX_MARSHAL; goto exception;\n }\n"); } } -- 2.39.2