]> git.tue.mpg.de Git - paraslash.git/commitdiff
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 99482d9d17f36ab0cfdd1e86e29ca1a641e6cf28..a287890c4ca20c248c681d79038ad5f378b9d858 100644 (file)
--- a/server.c
+++ b/server.c
@@ -523,14 +523,6 @@ genocide:
                        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;
 
diff --git a/vss.c b/vss.c
index a59c00f819d1f7284edd64e04bfb7a045fa452ee..704c39300e569d9da65fe2a043880e7966c4f8c2 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();