Handle sender commands in vss_post_select().
authorAndre Noll <maan@systemlinux.org>
Sat, 12 Apr 2008 07:43:57 +0000 (09:43 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 12 Apr 2008 07:43:57 +0000 (09:43 +0200)
server.c
vss.c

index 99482d9..a287890 100644 (file)
--- a/server.c
+++ b/server.c
@@ -523,14 +523,6 @@ genocide:
                        exit(EXIT_FAILURE);
                }
        }
                        exit(EXIT_FAILURE);
                }
        }
-       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 (!FD_ISSET(sockfd, &rfds))
                goto repeat;
 
        if (!FD_ISSET(sockfd, &rfds))
                goto repeat;
 
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;
 
 {
        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();
        if (afsss != AFS_SOCKET_CHECK_FOR_WRITE) {
                if (FD_ISSET(afs_socket, rfds))
                        recv_afs_result();