Handle sender commands in vss_post_select().
[paraslash.git] / vss.c
diff --git a/vss.c b/vss.c
index a59c00f..704c393 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -490,6 +490,14 @@ void vss_post_select(fd_set *rfds, fd_set *wfds)
 {
        int ret, i;
 
+       if (mmd->sender_cmd_data.cmd_num >= 0) {
+               int num = mmd->sender_cmd_data.cmd_num,
+                       s = mmd->sender_cmd_data.sender_num;
+
+               if (senders[s].client_cmds[num])
+                       senders[s].client_cmds[num](&mmd->sender_cmd_data);
+               mmd->sender_cmd_data.cmd_num = -1;
+       }
        if (afsss != AFS_SOCKET_CHECK_FOR_WRITE) {
                if (FD_ISSET(afs_socket, rfds))
                        recv_afs_result();