From d4fd7f0255b3fc8c9405dba3b4f5618384c6024b Mon Sep 17 00:00:00 2001 From: Andre Date: Sat, 25 Mar 2006 20:59:21 +0100 Subject: [PATCH 1/1] com_next() fix. Do not clear the AFS_NEXT flag in afs_send_chunk() and increase mmd->events. Fixes a (rare) problem where the next command did not work. --- afs.c | 2 +- command.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/afs.c b/afs.c index 0712cc27..a73b18e0 100644 --- a/afs.c +++ b/afs.c @@ -454,7 +454,7 @@ void afs_send_chunk(void) if (tv_diff(&due, &now, NULL) > 0) return; buf = af->read_chunk(mmd->current_chunk, &ret); - mmd->new_afs_status_flags &= ~(AFS_NEXT | AFS_REPOS); + mmd->new_afs_status_flags &= ~AFS_REPOS; if (!buf) { if (ret < 0) mmd->new_afs_status_flags = AFS_NEXT; diff --git a/command.c b/command.c index d317c345..9c8ef85c 100644 --- a/command.c +++ b/command.c @@ -879,6 +879,7 @@ static int com_next(__unused int socket_fd, int argc, __unused char **argv) if (argc) return -E_COMMAND_SYNTAX; mmd_lock(); + mmd->events++; mmd->new_afs_status_flags |= AFS_NEXT; mmd_unlock(); return 1; -- 2.39.2