]> rtime.felk.cvut.cz Git - frescor/forb.git/blobdiff - forb-idl/forb-idl-c-stubs.c
IDL compiler: Invoke methods directly only within the same executor
[frescor/forb.git] / forb-idl / forb-idl-c-stubs.c
index f553283be8ef856bdd7afc1692bad599bf49184d..6405e32aa4b544b0bc0606b12c4361ca0c25b1d2 100644 (file)
@@ -44,7 +44,8 @@ cs_output_stub (IDL_tree     tree,
 /*             fprintf(of, "    return "FORB_RETVAL_VAR_NAME";\n"); */
 /*     } */
         fprintf(of, "  if (ev) ev->major = FORB_EX_NONE;\n");
-        fprintf(of, "  if (forb_object_is_local(_obj)) {\n");
+        fprintf(of, "  if (forb_object_is_local(_obj) &&\n"
+                          "forb_get_current_executor() == forb_object_get_executor(_obj)) {\n");
         fprintf(of, "    if (!_obj->interface ||\n"
                     "        strncmp(_obj->interface->name, \"%s\", %zd) != 0) {\n"
                     "      ev->major = FORB_EX_BAD_OPERATION;\n"