]> granicus.if.org Git - apache/commitdiff
When unlocking, the auto-checkin code does not need to refer to the
authorGreg Stein <gstein@apache.org>
Tue, 7 Jan 2003 21:08:03 +0000 (21:08 +0000)
committerGreg Stein <gstein@apache.org>
Tue, 7 Jan 2003 21:08:03 +0000 (21:08 +0000)
parent resource. We want to (possibly) check in only the resource
identified by the params.

Bug found by David Waite <mass@akuma.org>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98187 13f79535-47bb-0310-9956-ffa450edef68

modules/dav/main/util.c

index 5ca232c13f0f0cc9ef6897e1ca8902e0f30dcef9..17729827882f6ead5b7843ba14ab37a923b72adc 100644 (file)
@@ -2019,14 +2019,14 @@ dav_error *dav_auto_checkin(
     /* If parent resource was checked out, and auto-checkin is enabled,
      * then check it in.
      */
-    if (av_info->parent_resource != NULL && av_info->parent_resource->working
-        && (unlock || av_info->parent_checkedout)) {
+    if (!unlock
+        && av_info->parent_checkedout
+        && av_info->parent_resource != NULL
+        && av_info->parent_resource->working) {
 
         auto_version = (*vsn_hooks->auto_versionable)(av_info->parent_resource);
 
-        if (auto_version == DAV_AUTO_VERSION_ALWAYS ||
-            (unlock && (auto_version == DAV_AUTO_VERSION_LOCKED))) {
-
+        if (auto_version == DAV_AUTO_VERSION_ALWAYS) {
             if ((err = (*vsn_hooks->checkin)(av_info->parent_resource,
                                              0 /*keep_checked_out*/, NULL))
                 != NULL) {