bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in CVS flow control


From: Ian Lance Taylor
Subject: Bug in CVS flow control
Date: 9 Jun 2004 14:27:07 -0400

In do_recursion() in recurse.c there is code to handle flow control
with the server, inside the SERVER_FLOWCONTROL #ifdef.  That code used
to look like this:

  if (server_active
       /* If there are writelocks around, we cannot pause here.  */      
       && (should_readlock || noexec))
      server_pause_check();

In October 2002, this change was made:

2002-10-05  Larry Jones  <lawrence.jones@eds.com>

        * recurse.c (start_recursion, do_recursion): Allow write locking
        in addition to read locking.  Change all callers.

The code now looks like this:

    if (server_active && locktype != CVS_LOCK_NONE)
        server_pause_check();

These cases are clearly not identical.  The original code will call
server_pause_check() when there are no locks, or when there are only
read locks.  The new code will call server_pause_check() when read
locks or write locks are held.

The new code is incorrect.  server_pause_check() should not be called
when write locks are active.  It should be called when no locks are
active.

This is the obvious patch.


2004-06-09  Ian Lance Taylor  <ian@wasabisystems.com>

        * recurse.c (do_recursion): Correct test for calling
        server_pause_check to occur when locktype != CVS_LOCK_WRITE.


--- recurse.c.~1.97.~   2004-05-03 11:28:25.000000000 -0400
+++ recurse.c   2004-06-09 14:25:29.000000000 -0400
@@ -640,7 +640,7 @@ do_recursion (struct recursion_frame *fr
      * generating data, to give the buffers a chance to drain to the
      * remote client.  We should not have locks active at this point,
      * but if there are writelocks around, we cannot pause here.  */
-    if (server_active && locktype != CVS_LOCK_NONE)
+    if (server_active && locktype != CVS_LOCK_WRITE)
        server_pause_check();
 #endif
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]