diff --git a/indra/llvfs/llpidlock.cpp b/indra/llvfs/llpidlock.cpp index 5df5eadbe..21cfa66a8 100644 --- a/indra/llvfs/llpidlock.cpp +++ b/indra/llvfs/llpidlock.cpp @@ -44,19 +44,22 @@ #include -namespace { - inline DWORD getpid() { - return GetCurrentProcessId(); - } +static U32 getPID() { + return GetCurrentProcessId(); } -bool isProcessAlive(U32 pid) +static bool isProcessAlive(U32 pid) { return (bool) GetProcessVersion((DWORD)pid); } #else //Everyone Else -bool isProcessAlive(U32 pid) + +static U32 getPID() { + return getpid(); +} + +static bool isProcessAlive(U32 pid) { return (bool) kill( (pid_t)pid, 0); } @@ -71,7 +74,7 @@ class LLPidLockFile mAutosave(false), mSaving(false), mWaiting(false), - mPID(getpid()), + mPID(getPID()), mNameTable(NULL), mClean(true) { diff --git a/indra/llvfs/llpidlock.h b/indra/llvfs/llpidlock.h index 496e99cf5..7354c61ab 100644 --- a/indra/llvfs/llpidlock.h +++ b/indra/llvfs/llpidlock.h @@ -47,19 +47,19 @@ namespace LLPidLock bool requestLock( LLNameTable *name_table=NULL, bool autosave=TRUE, bool force_immediate=FALSE, F32 timeout=300.0); - bool checkLock(); - void releaseLock(); - bool isClean(); + bool checkLock(); + void releaseLock(); + bool isClean(); //getters - LLNameTable * getNameTable(); - bool getAutosave(); - bool getClean(); - std::string getSaveName(); + LLNameTable * getNameTable(); + bool getAutosave(); + bool getClean(); + std::string getSaveName(); //setters - void setClean(bool clean); - void setSaveName(std::string savename); + void setClean(bool clean); + void setSaveName(std::string savename); }; #endif // LL_PIDLOCK_H diff --git a/indra/newview/rlvlocks.cpp b/indra/newview/rlvlocks.cpp index 2dd346cf4..0cc6822f6 100644 --- a/indra/newview/rlvlocks.cpp +++ b/indra/newview/rlvlocks.cpp @@ -1096,7 +1096,7 @@ bool RlvFolderLocks::getLockedFolders(const folderlock_source_t& lockSource, LLI case ST_WEARABLETYPE: { RLV_ASSERT( ((ST_ATTACHMENTPOINT == lockSource.first) && (typeid(S32) == lockSource.second.type())) || - ((ST_WEARABLETYPE == lockSource.first) && (typeid(EWearableType) == lockSource.second.type())) ); + ((ST_WEARABLETYPE == lockSource.first) && (typeid(LLWearableType::EType) == lockSource.second.type())) ); uuid_vec_t idItems; if (ST_ATTACHMENTPOINT == lockSource.first) @@ -1286,6 +1286,9 @@ void RlvFolderLocks::refreshLockedLookups() const case LLAssetType::AT_OBJECT: m_LockedAttachmentRem.push_back(pItem->getLinkedUUID()); break; + default: + RLV_ASSERT(true); + break; } } } diff --git a/indra/newview/rlvlocks.h b/indra/newview/rlvlocks.h index 857455ca2..9029c6f2a 100644 --- a/indra/newview/rlvlocks.h +++ b/indra/newview/rlvlocks.h @@ -568,7 +568,7 @@ inline bool RlvWearableLocks::isLockedWearable(const LLWearable* pWearable) cons RLV_ASSERT(pWearable); return (pWearable) && - ( (isLockedWearableType(pWearable->getType(), RLV_LOCK_REMOVE)) || (RlvFolderLocks::instance().isLockedWearable(pWearable->getItemID())) ); + ( (isLockedWearableType(pWearable->getType(), RLV_LOCK_REMOVE)) || (RlvFolderLocks::instance().isLockedWearable(pWearable->getItemID())) ); } // Checked: 2010-03-19 (RLVa-1.2.0c) | Added: RLVa-1.2.0a @@ -630,12 +630,13 @@ inline bool RlvFolderLocks::canRemoveFolder(const LLUUID& idFolder) const // Checked: 2011-03-29 (RLVa-1.3.0g) | Added: RLVa-1.3.0g inline bool RlvFolderLocks::canRenameFolder(const LLUUID& idFolder) const { - // Block renaming a folder if: + /* Block renaming a folder if: // - the folder (or one of its descendents) is explicitly locked by: // -> a "shared path" => renaming the folder would change the shared path and hence invalidate the lock // -> an attachment point \ // -> an attachment |--> renaming the folder to a "dot" (=invisible) folder would invalidate the lock // -> a wearable type / + */ return !hasLockedFolderDescendent(idFolder, ST_SHAREDPATH | ST_ATTACHMENT | ST_ATTACHMENTPOINT | ST_WEARABLETYPE, PERM_MASK_ANY, RLV_LOCK_ANY, true); }