X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/forb.git/blobdiff_plain/538cadbd02d9d9b01547570d8e4ede8e31fa7650..a6448c3882b3f10dbcaefb722ec2ab492d992979:/src/iop.c diff --git a/src/iop.c b/src/iop.c index 5133069..248f94a 100644 --- a/src/iop.c +++ b/src/iop.c @@ -388,6 +388,7 @@ process_request(forb_port_t *port, FORB_CDR_Codec *codec, uint32_t message_size) exec_req = forb_malloc(sizeof(*exec_req)); if (exec_req) { memset(exec_req, 0, sizeof(exec_req)); + exec_req->request_type = remote; exec_req->request_id = request_header.request_id; exec_req->source = request_header.source; exec_req->obj = obj; @@ -732,6 +733,7 @@ forb_request_send(forb_request_t *req, CORBA_Environment *env) size_t len; fosa_abs_time_t timeout; forb_t *forb = forb_object_to_forb(req->obj); + forb_exec_req_t *exec_req; if (!forb) { env->major = FORB_EX_INTERNAL; @@ -748,6 +750,21 @@ forb_request_send(forb_request_t *req, CORBA_Environment *env) return; } + /* Local invocation case, destination of a message is only + * a different executor thread */ + if (forb_object_is_local(req->obj)) { + exec_req = forb_malloc(sizeof(*exec_req)); + memset(exec_req, 0, sizeof(exec_req)); + exec_req->request_type = local; + exec_req->input_request = req; + exec_req->obj = exec_req->input_request->obj; + //exec_req->method_index = req.method_index; + exec_req->codec = exec_req->input_request->cdr_request; //FIXME: or better without copying? + exec_req->request_id = exec_req->input_request->request_id; + forb_exec_req_ins_tail(forb_object_get_executor(exec_req->obj), exec_req); + return; + } + ret = forb_iop_prepend_message_header(&req->cdr_request, forb_iop_REQUEST); if (!ret) { /* This should never happen */