Fix com_nomore.
authorAndre Noll <maan@systemlinux.org>
Sun, 11 Nov 2007 19:24:20 +0000 (20:24 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 11 Nov 2007 19:24:20 +0000 (20:24 +0100)
vss.c

diff --git a/vss.c b/vss.c
index 75cf0f8764e273c3286ed41224b3962f61c4dc75..e470a737d4c9224bf06336c02f02c77ff1c8fa24 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -184,6 +184,8 @@ static void vss_eof(void)
                        senders[i].shutdown_clients();
                return;
        }
                        senders[i].shutdown_clients();
                return;
        }
+       if (mmd->new_vss_status_flags & VSS_NOMORE)
+               mmd->new_vss_status_flags = VSS_NEXT;
        gettimeofday(&now, NULL);
        tv_add(&mmd->afd.afhi.eof_tv, &now, &eof_barrier);
        munmap(map, mmd->size);
        gettimeofday(&now, NULL);
        tv_add(&mmd->afd.afhi.eof_tv, &now, &eof_barrier);
        munmap(map, mmd->size);
@@ -301,8 +303,6 @@ struct timeval *vss_preselect(fd_set *rfds, fd_set *wfds, int *max_fileno)
                                tv_add(&mmd->afd.afhi.eof_tv, &now, &eof_barrier);
                        if (vss_repos())
                                tv_add(&now, &announce_tv, &data_send_barrier);
                                tv_add(&mmd->afd.afhi.eof_tv, &now, &eof_barrier);
                        if (vss_repos())
                                tv_add(&now, &announce_tv, &data_send_barrier);
-                       if (mmd->new_vss_status_flags & VSS_NOMORE)
-                               mmd->new_vss_status_flags = VSS_NEXT;
                }
                mmd->chunks_sent = 0;
        }
                }
                mmd->chunks_sent = 0;
        }