summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkarl <karl>2008-08-27 23:57:20 +0000
committerkarl <karl>2008-08-27 23:57:20 +0000
commit9e35e7ba1765f5a19a7b099953497605d6dc67d4 (patch)
tree10d71ce41c0cd2015733edd1e587d6216c5c5ec8
parent6af1bd8cd4a7f48ab1ca7051e17f3bfac1f6e840 (diff)
downloadtog-pegasus-TASK-PEP328_SOLARIS_NEVADA_PORT_v2-branch.zip
tog-pegasus-TASK-PEP328_SOLARIS_NEVADA_PORT_v2-branch.tar.gz
tog-pegasus-TASK-PEP328_SOLARIS_NEVADA_PORT_v2-branch.tar.xz
TITLE: SunPort DESCRIPTION: Add changes to final test branch
-rw-r--r--mak/config.mak5
-rw-r--r--src/Pegasus/Common/ThreadPool.cpp4
-rwxr-xr-xsrc/Pegasus/Common/tests/AsyncQueue/TestAsyncQueue.cpp22
-rw-r--r--src/Pegasus/Security/UserManager/tests/AuthorizationHandler/AuthorizationHandler.cpp2
-rw-r--r--src/Pegasus/Security/UserManager/tests/UserManager/UserManager.cpp2
-rw-r--r--src/slp/slp_agent/peg_slp_agent.cpp12
6 files changed, 27 insertions, 20 deletions
diff --git a/mak/config.mak b/mak/config.mak
index 5902727..b3518d5 100644
--- a/mak/config.mak
+++ b/mak/config.mak
@@ -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)
diff --git a/src/Pegasus/Common/ThreadPool.cpp b/src/Pegasus/Common/ThreadPool.cpp
index 0e576d0..4aa19f8 100644
--- a/src/Pegasus/Common/ThreadPool.cpp
+++ b/src/Pegasus/Common/ThreadPool.cpp
@@ -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;
diff --git a/src/Pegasus/Common/tests/AsyncQueue/TestAsyncQueue.cpp b/src/Pegasus/Common/tests/AsyncQueue/TestAsyncQueue.cpp
index 3b04a4f..b2b5711 100755
--- a/src/Pegasus/Common/tests/AsyncQueue/TestAsyncQueue.cpp
+++ b/src/Pegasus/Common/tests/AsyncQueue/TestAsyncQueue.cpp
@@ -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);
diff --git a/src/Pegasus/Security/UserManager/tests/AuthorizationHandler/AuthorizationHandler.cpp b/src/Pegasus/Security/UserManager/tests/AuthorizationHandler/AuthorizationHandler.cpp
index f8d753a..c1cfdcf 100644
--- a/src/Pegasus/Security/UserManager/tests/AuthorizationHandler/AuthorizationHandler.cpp
+++ b/src/Pegasus/Security/UserManager/tests/AuthorizationHandler/AuthorizationHandler.cpp
@@ -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:
diff --git a/src/Pegasus/Security/UserManager/tests/UserManager/UserManager.cpp b/src/Pegasus/Security/UserManager/tests/UserManager/UserManager.cpp
index a5c0623..6f8cbb4 100644
--- a/src/Pegasus/Security/UserManager/tests/UserManager/UserManager.cpp
+++ b/src/Pegasus/Security/UserManager/tests/UserManager/UserManager.cpp
@@ -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:
diff --git a/src/slp/slp_agent/peg_slp_agent.cpp b/src/slp/slp_agent/peg_slp_agent.cpp
index da9eaea..de2cbbe 100644
--- a/src/slp/slp_agent/peg_slp_agent.cpp
+++ b/src/slp/slp_agent/peg_slp_agent.cpp
@@ -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