searchengine/cpix/cpix/src/idxdbmgr.cpp
changeset 23 d4d56f5e7c55
parent 2 6c1a2771f4b7
--- a/searchengine/cpix/cpix/src/idxdbmgr.cpp	Mon Sep 20 12:35:47 2010 +0530
+++ b/searchengine/cpix/cpix/src/idxdbmgr.cpp	Tue Oct 05 13:15:12 2010 +0530
@@ -60,7 +60,7 @@
     template<typename INTEGER>
     struct HighestBit
     {
-        enum { Value = (1 << (8*sizeof(INTEGER) - 1)) };
+        enum { Value = ((INTEGER)1 << (8*sizeof(INTEGER) - 1)) };
     };
     
 
@@ -328,6 +328,10 @@
         instance_ = NULL;
     }
 
+    const InitParams& IdxDbMgr::getInitParams() const
+    {
+		return initParams_;
+    }
 
     IdxDbHndl IdxDbMgr::create(const char   * qualBaseAppClass)
     {
@@ -532,7 +536,7 @@
     Version IdxDbMgr::getNextVersion()
     {
         Cpt::SyncRegion
-            sr(mutex_);
+            sr(versionMutex_);
 
         Version
             rv = version_;
@@ -894,6 +898,7 @@
           regFilePath_(ip.getCpixDir()),
           maxIdleSec_(ip.getMaxIdleSec()),
           mutex_(true), // recursive
+          versionMutex_(false), // not recursive 
           version_(0),
           initParams_(ip),
           housekeepCounter_(0)