From f7feafeef70ad8f4e8c6fff715a2287f3240e759 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 14 Jun 2010 17:09:04 +0200 Subject: [PATCH] Print a log message if the sender command fails. Currently there is no infrastructure for passing down a value from vss, which runs in parent context, to the child process. In particular, we can not pass the return value of the sender subcommand handlers to com_sender() to propagate it to the client. However, we may easily write a log message that explains the cause of the error, which is not optimal, but better than nothing. Thanks to Gerrit Renker who pointed out this flaw. --- vss.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vss.c b/vss.c index 898180c0..0eb235c7 100644 --- a/vss.c +++ b/vss.c @@ -920,8 +920,12 @@ static void vss_post_select(struct sched *s, struct task *t) int num = mmd->sender_cmd_data.cmd_num, sender_num = mmd->sender_cmd_data.sender_num; - if (senders[sender_num].client_cmds[num]) - senders[sender_num].client_cmds[num](&mmd->sender_cmd_data); + if (senders[sender_num].client_cmds[num]) { + ret = senders[sender_num].client_cmds[num] + (&mmd->sender_cmd_data); + if (ret < 0) + PARA_ERROR_LOG("%s\n", para_strerror(-ret)); + } mmd->sender_cmd_data.cmd_num = -1; } if (vsst->afsss != AFS_SOCKET_CHECK_FOR_WRITE) -- 2.39.5