aboutgitcodelistschat:MatrixIRC
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-02-21 13:15:16 +0100
committerAlice Frosi <afrosi@redhat.com>2023-02-21 13:28:09 +0100
commit6ad5dd9567d541ad9403354629f068fa37de32b9 (patch)
tree8f0bea26c6004cfcedbbf9e347aae7d8bb18b2d9
parenta9f04c33e5370755f36e9e85250c6ab997f94004 (diff)
downloadseitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar
seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar.gz
seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar.bz2
seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar.lz
seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar.xz
seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar.zst
seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.zip
actions: set error on act_call
-rw-r--r--actions.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/actions.c b/actions.c
index 8e740e0..ff8ff93 100644
--- a/actions.c
+++ b/actions.c
@@ -181,10 +181,23 @@ int do_actions(void *data, struct action actions[], unsigned int n_actions, int
c.args = &actions[i].call;
c.pid = pid;
if (do_call(&c) == -1) {
+ resp.error = -1;
+ if (send_target(&resp, notifyfd) == -1)
+ return -1;
+ }
+ if (c.err != 0) {
resp.error = c.err;
if (send_target(&resp, notifyfd) == -1)
return -1;
}
+ /*
+ * The result of the call needs to be save as
+ * reference
+ */
+ if (actions[i].call.has_ret) {
+ memcpy(data + actions[i].call.ret_off,
+ &c.ret, sizeof(c.ret));
+ }
break;
case A_BLOCK:
resp.id = id;