Roxen.git / server / base_server / module.pike

version» Context lines:

Roxen.git/server/base_server/module.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS. - // $Id: module.pike,v 1.179 2004/05/05 21:17:56 mast Exp $ + // $Id: module.pike,v 1.180 2004/05/06 15:32:55 grubba Exp $      #include <module_constants.h>   #include <module.h>   #include <request_trace.h>      constant __pragma_save_parent__ = 1;      inherit "basic_defvar";   mapping(string:array(int)) error_log=([]);   
Roxen.git/server/base_server/module.pike:928:   mapping(string:mixed) unlock_file (string path,    DAVLock lock,    RequestID id)   {    TRACE_ENTER(sprintf("unlock_file(%O, lock(%O), X).", path, lock->locktoken),    this);    mixed auth_user = authenticated_user_id (path, id);    path = resource_id (path, id);    DAVLock removed_lock;    if (lock->recursive) { -  removed_lock = m_delete (prefix_locks[path], auth_user); -  if (!sizeof (prefix_locks[path])) m_delete (prefix_locks, path); +  if (prefix_locks[path]) { +  removed_lock = m_delete(prefix_locks[path], auth_user); +  if (!sizeof(prefix_locks[path])) m_delete(prefix_locks, path);    } -  else { +  } +  else if (file_locks[path]) {    removed_lock = m_delete (file_locks[path], auth_user);    if (!sizeof (file_locks[path])) m_delete (file_locks, path);    }    ASSERT_IF_DEBUG (!removed_lock || lock /*%O*/ == removed_lock /*%O*/,    lock, removed_lock);    TRACE_LEAVE("Ok.");    return 0;   }      //! Check if we may perform a write access to @[path].