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.212 2004/05/15 11:23:36 grubba Exp $ + // $Id: module.pike,v 1.213 2004/05/17 17:44:58 mast 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:823:    TRACE_LEAVE ("Got no locks");    return 0;    }       mixed auth_user = authenticated_user_id (path, id);    path = resource_id (path, id);       if (DAVLock lock =    file_locks[path] && file_locks[path][auth_user] ||    prefix_locks[path] && prefix_locks[path][auth_user]) { -  TRACE_LEAVE(sprintf("Found lock %O.", lock->locktoken)); +  TRACE_LEAVE(sprintf("Found own lock %O.", lock->locktoken));    return lock;    }       LockFlag shared;       if (mapping(mixed:DAVLock) locks = file_locks[path]) {    foreach(locks;; DAVLock lock) {    if (lock->lockscope == "DAV:exclusive") {    TRACE_LEAVE(sprintf("Found other user's exclusive lock %O.",    lock->locktoken));    return LOCK_EXCL_AT;    }    shared = LOCK_SHARED_AT;    break;    }    }       foreach(prefix_locks;    string prefix; mapping(mixed:DAVLock) locks) {    if (has_prefix(path, prefix)) { -  if (DAVLock lock = locks[auth_user]) return lock; +  if (DAVLock lock = locks[auth_user]) { +  SIMPLE_TRACE_LEAVE ("Found own lock %O on %O.", lock->locktoken, prefix); +  return lock; +  }    if (!shared)    // If we've found a shared lock then we won't find an    // exclusive one anywhere else.    foreach(locks;; DAVLock lock) {    if (lock->lockscope == "DAV:exclusive") {    TRACE_LEAVE(sprintf("Found other user's exclusive lock %O.",    lock->locktoken));    return LOCK_EXCL_AT;    }    shared = LOCK_SHARED_AT;