Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
6e47775121
  1. BIN
      iguana/pnacl/Release/iguana.pexe
  2. 16
      pnacl_main.h

BIN
iguana/pnacl/Release/iguana.pexe

Binary file not shown.

16
pnacl_main.h

@ -187,18 +187,22 @@ void PostMessage(const char* format, ...)
*/
static int ParseMessage(struct PP_Var message,const char **out_function,struct PP_Var *out_params)
{
char *jsonstr;
if ( message.type != PP_VARTYPE_DICTIONARY )
return(1);
struct PP_Var cmd_value = GetDictVar(message, "cmd");
*out_function = VarToCStr(cmd_value);
g_ppb_var->Release(cmd_value);
*out_params = GetDictVar(message, "args");
PNACL_message("Parse.(%s) cmd.(%s)\n",*out_function,VarToCStr(*out_params));
if ( cmd_value.type != PP_VARTYPE_STRING )
return(1);
if ( out_params->type != PP_VARTYPE_ARRAY )
return(1);
return(0);
if ( (jsonstr= VarToCStr(*out_params)) != 0 )
{
PNACL_message("Parse.(%s) cmd.(%s)\n",*out_function,jsonstr);
if ( cmd_value.type != PP_VARTYPE_STRING )
return(1);
if ( out_params->type != PP_VARTYPE_ARRAY )
return(1);
return(0);
} else return(1);
}
static HandleFunc GetFunctionByName(const char* function_name)

Loading…
Cancel
Save