PEP#: 328 TASK-PEP328_SOLARIS_NEVADA_PORT_v2-branch
authorkarl <karl>
Wed, 27 Aug 2008 23:57:20 +0000 (23:57 +0000)
committerkarl <karl>
Wed, 27 Aug 2008 23:57:20 +0000 (23:57 +0000)
TITLE: SunPort

DESCRIPTION: Add changes to final test branch

mak/config.mak
src/Pegasus/Common/ThreadPool.cpp
src/Pegasus/Common/tests/AsyncQueue/TestAsyncQueue.cpp
src/Pegasus/Security/UserManager/tests/AuthorizationHandler/AuthorizationHandler.cpp
src/Pegasus/Security/UserManager/tests/UserManager/UserManager.cpp
src/slp/slp_agent/peg_slp_agent.cpp

index 5902727d10cb210e3c1def117761b3e85f2e7335..b3518d5bb99617746f3cb9120a19528415b145b9 100644 (file)
@@ -907,10 +907,11 @@ ifdef PEGASUS_USE_OPENSLP
       Please use PEGASUS_USE_EXTERNAL_SLP)
   endif
   ## if PEGASUS_USE_OPENSLP used, convert to EXTERNAL_SLP variables
+  ## as defined for openslp
   ifeq ($(PEGASUS_USE_OPENSLP),true)
     ifeq ($(PEGASUS_ENABLE_SLP),true)
-      ###DEFINES += -DPEGASUS_USE_EXTERNAL_SLP_TYPE=1
-      PEGASUS_USE_EXTERNAL_SLP_TYPE=openslp
+      DEFINES += -DPEGASUS_USE_EXTERNAL_SLP_TYPE=1
+      PEGASUS_USE_EXTERNAL_SLP=openslp
     else
       $(error PEGASUS_USE_OPENSLP defined but PEGASUS_ENABLE_SLP is not true. \
         Please correct this inconsistency)
index 0e576d0355d17c93b85a3931871d1920dc65503e..4aa19f826316b02984a2740de19c63ff06f477c6 100644 (file)
@@ -462,11 +462,7 @@ Boolean ThreadPool::_timeIntervalExpired(
     Uint32 usec;
     Time::gettimeofday(&now);
 
-#if defined(PEGASUS_OS_SOLARIS)
     memset(&remaining, 0, sizeof(remaining));
-#else
-    Time::gettimeofday(&remaining);     // Avoid valgrind error
-#endif
 
     finish.tv_sec = start->tv_sec + interval->tv_sec;
     usec = start->tv_usec + interval->tv_usec;
index 3b04a4f7bc68f9587459dc76fc098883c24e2f23..b2b571155e5a5ac468ec07846192aba3824c4713 100755 (executable)
@@ -68,14 +68,19 @@ static ThreadReturnType PEGASUS_THREAD_CDECL _reader(void* self_)
             printf("iterations: %05u\n", message->x);
         }
 
-#ifdef PEGASUS_OS_SOLARIS
+// The following was a noted issue for earlier versions of
+// Solaris (ex. 5.8) It has been commented out for later
+// version (ex. 10 and 11). NOTE: if we are to guarantee
+// compatibility with earlier versions this may have to be
+// reinstated for those versions.
+//#ifdef PEGASUS_OS_SOLARIS
         // special dish of the day for Sun Solaris
         // reports say that running as root causes
         // the thread not being scheduled-out
         // until this is resolved the yield()
         // will stay here just for Solaris
-        Threads::yield();
-#endif
+//        Threads::yield();
+//#endif
 
         delete message;
     }
@@ -91,14 +96,19 @@ static ThreadReturnType PEGASUS_THREAD_CDECL _writer(void* self_)
     for (Uint32 i = 0; i < ITERATIONS; i++)
     {
         queue->enqueue(new TestMessage(i));
+// The following was a noted issue for earlier versions of
+// Solaris (ex. 5.8) It has been commented out for later
+// version (ex. 10 and 11). NOTE: if we are to guarantee
+// compatibility with earlier versions this may have to be
+// reinstated for those versions.
 // special dish of the day for Sun Solaris
 // reports say that running as root causes
 // the thread not being scheduled-out
 // until this is resolved the yield()
 // will stay here just for Solaris
-#ifdef PEGASUS_OS_SOLARIS
-        Threads::yield();
-#endif
+//#ifdef PEGASUS_OS_SOLARIS
+//        Threads::yield();
+//#endif
     }
 
     return ThreadReturnType(0);
index f8d753acaffb5526e579fc0a753b387709d672ed..c1cfdcfc0f68ca82368110e68c5fd30ce6939703 100644 (file)
@@ -80,8 +80,6 @@ int main(int argc, char** argv)
     }
     repositoryPath.append("/repository");
 
-    PEGASUS_TEST_ASSERT(FileSystem::isDirectory(repositoryPath));
-
     CIMRepository* repository = new CIMRepository(repositoryPath);
 
     // -- Create a UserManager object:
index a5c0623351930531fbed3ad0ce82b9a54c19c94b..6f8cbb42f9af155d52fb011103d47c9da59e5b1b 100644 (file)
@@ -69,8 +69,6 @@ int main(int argc, char** argv)
     }
     repositoryPath.append("/repository");
 
-    FileSystem::isDirectory(repositoryPath);
-
     CIMRepository* repository = new CIMRepository(repositoryPath);
 
     // -- Create a UserManager object:
index da9eaea45b3496ad07aa9e492be9bb48da4fa553..de2cbbec2e0de22347b2c672107bf59acd04ade5 100644 (file)
@@ -46,13 +46,17 @@ PEGASUS_NAMESPACE_BEGIN
 // OpenSLP allows NULL so that it can select the locale.
 
 #ifdef PEGASUS_USE_EXTERNAL_SLP_TYPE
+// language typing for slp call only applies to SOLARIS
 #ifdef PEGASUS_OS_SOLARIS
-//      If 2 (i.e. solarisslp). Set language.
+        // If 2 (i.e. solarisslp). Set language.
 #if     PEGASUS_USE_EXTERNAL_SLP_TYPE == 2
-        const char* slp_service_agent::slp_lang = "en";
-#else   // any other external slp implementation
+        const char* slp_serviceagent::slp_lang = "en";
+        // if 1, openslp and let slp set language        
+#elif PEGASUS_USE_EXTERNAL_SLP_TYPE == 1
+    _   const char* slp_serviceagent::slp_lang = NULL;
+#else   // Some other implementation
         const char* slp_service_agent::slp_lang = NULL;
-#endif  
+#endif  // End PEGASUS_USE_EXTERNAL_SLP_TYPE 
 #else   // NOT PEGASUS_OS_SOLARIS
     const char* slp_service_agent::slp_lang = NULL;
 #endif