summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstorri <storri@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-01-18 20:09:32 +0000
committerstorri <storri@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-01-18 20:09:32 +0000
commit235cb92daba2cc4d5622568fd7f210d64ac64b3a (patch)
tree9d5d169ac96fb8f4360f9cfcbddbf04105e21596
parent9405cbb60c92dfd1436fd63a5aba1677b2df2ecb (diff)
downloadATCD-235cb92daba2cc4d5622568fd7f210d64ac64b3a.tar.gz
QoS Done
Memory Done - Obstack_T.cpp missing #ifndef and #endif to protect against including source file twice. Corrected.
-rw-r--r--ace/Memory/Malloc.h2
-rw-r--r--ace/Memory/Obstack_T.cpp5
-rw-r--r--ace/QoS/QoS_Decorator.cpp2
-rw-r--r--ace/QoS/QoS_Decorator.h10
-rw-r--r--ace/QoS/QoS_Manager.cpp11
-rw-r--r--ace/QoS/QoS_Manager.h10
-rw-r--r--ace/QoS/QoS_Session.h6
-rw-r--r--ace/QoS/QoS_Session_Factory.cpp31
-rw-r--r--ace/QoS/QoS_Session_Factory.h4
-rw-r--r--ace/QoS/QoS_Session_Impl.cpp26
-rw-r--r--ace/QoS/SOCK_Dgram_Mcast_QoS.cpp20
-rw-r--r--ace/QoS/SOCK_Dgram_Mcast_QoS.h6
-rw-r--r--ace/Sockets/SOCK_Dgram.cpp16
-rw-r--r--ace/Sockets/SOCK_Dgram.h8
-rw-r--r--ace/Sockets/SOCK_Dgram_Mcast.cpp6
-rw-r--r--ace/Sockets/SOCK_Dgram_Mcast.h6
-rw-r--r--ace/Utils/Unbounded_Set.cpp2
17 files changed, 116 insertions, 55 deletions
diff --git a/ace/Memory/Malloc.h b/ace/Memory/Malloc.h
index b93c0cbc1a8..f32f964b9e9 100644
--- a/ace/Memory/Malloc.h
+++ b/ace/Memory/Malloc.h
@@ -21,7 +21,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#ifdef ACE_SUBSET_0
-#include "ace/Log_Msg.h"
+#include "ace/Logging/Log_Msg.h"
#endif
#if defined (ACE_HAS_MALLOC_STATS)
diff --git a/ace/Memory/Obstack_T.cpp b/ace/Memory/Obstack_T.cpp
index e279988782d..39a49683aea 100644
--- a/ace/Memory/Obstack_T.cpp
+++ b/ace/Memory/Obstack_T.cpp
@@ -1,5 +1,8 @@
// $Id$
+#ifndef OBSTACK_T_CPP
+#define OBSTACK_T_CPP
+
#include "ace/Memory/Obstack_T.h"
#if !defined (__ACE_INLINE__)
@@ -161,3 +164,5 @@ ACE_Obstack_T<CHAR>::release (void)
this->curr_ = this->head_;
this->curr_->block_ = this->curr_->cur_ = this->curr_->contents_;
}
+
+#endif /* OBSTACK_T_CPP */
diff --git a/ace/QoS/QoS_Decorator.cpp b/ace/QoS/QoS_Decorator.cpp
index 5db08066010..113a032c6ed 100644
--- a/ace/QoS/QoS_Decorator.cpp
+++ b/ace/QoS/QoS_Decorator.cpp
@@ -1,7 +1,7 @@
// QoS_Decorator.cpp
// $Id$
-#include "QoS_Decorator.h"
+#include "ace/QoS/QoS_Decorator.h"
ACE_RCSID(ace, QoS_Decorator, "$Id $")
diff --git a/ace/QoS/QoS_Decorator.h b/ace/QoS/QoS_Decorator.h
index 3fc38879113..82b2c3fdc2d 100644
--- a/ace/QoS/QoS_Decorator.h
+++ b/ace/QoS/QoS_Decorator.h
@@ -15,16 +15,16 @@
#define QOS_DECORATOR_H
#include "ace/pre.h"
-#include "ace/Reactor.h"
+#include "ace/Demux/Reactor.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/INET_Addr.h"
-#include "ace/Event_Handler.h"
-#include "SOCK_Dgram_Mcast_QoS.h"
-#include "ACE_QoS_Export.h"
+#include "ace/IPC/INET_Addr.h"
+#include "ace/Demux/Event_Handler.h"
+#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h"
+#include "ace/QoS/ACE_QoS_Export.h"
ACE_RCSID(QOS_Decorator, QOS_Decorator, "$Id$")
diff --git a/ace/QoS/QoS_Manager.cpp b/ace/QoS/QoS_Manager.cpp
index 7e698b0cad2..4c5bc7749c5 100644
--- a/ace/QoS/QoS_Manager.cpp
+++ b/ace/QoS/QoS_Manager.cpp
@@ -1,8 +1,11 @@
// QoS_Manager.cpp
// $Id$
-#include "QoS_Manager.h"
-#include "ace/Log_Msg.h"
+#include "ace/QoS/QoS_Manager.h"
+
+#ifdef ACE_SUBSET_0
+#include "ace/Logging/Log_Msg.h"
+#endif
ACE_RCSID(ace, QoS_Manager, "$Id $")
@@ -20,11 +23,15 @@ ACE_QoS_Manager::~ACE_QoS_Manager (void)
int
ACE_QoS_Manager::join_qos_session (ACE_QoS_Session *qos_session)
{
+#ifdef ACE_SUBSET_0
if (this->qos_session_set ().insert (qos_session) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_LIB_TEXT ("Error in adding a new session to the ")
ACE_LIB_TEXT ("socket session set\n")),
-1);
+#else
+ this->qos_session_set().insert(qos_session);
+#endif
return 0;
}
diff --git a/ace/QoS/QoS_Manager.h b/ace/QoS/QoS_Manager.h
index 3f5f000dc40..315e200652e 100644
--- a/ace/QoS/QoS_Manager.h
+++ b/ace/QoS/QoS_Manager.h
@@ -15,16 +15,16 @@
#define ACE_QOS_MANAGER_H
#include "ace/pre.h"
-#include "ace/Addr.h"
+#include "ace/IPC/Addr.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
#define ACE_LACKS_PRAGMA_ONCE
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/IPC_SAP.h"
-#include "ace/Containers_T.h"
-#include "ACE_QoS_Export.h"
-#include "QoS_Session.h"
+#include "ace/Sockets/IPC_SAP.h"
+#include "ace/Utils/Templates/Containers_T.h"
+#include "ace/QoS/ACE_QoS_Export.h"
+#include "ace/QoS/QoS_Session.h"
/**
* @class ACE_QoS_Manager
diff --git a/ace/QoS/QoS_Session.h b/ace/QoS/QoS_Session.h
index f67a9f52416..1552ec0f7d9 100644
--- a/ace/QoS/QoS_Session.h
+++ b/ace/QoS/QoS_Session.h
@@ -15,9 +15,9 @@
#define ACE_QOS_SESSION_H
#include "ace/pre.h"
-#include "ACE_QoS_Export.h"
-#include "ace/INET_Addr.h"
-#include "ace/OS_QoS.h"
+#include "ace/QoS/ACE_QoS_Export.h"
+#include "ace/IPC/INET_Addr.h"
+#include "ace/OS/OS_QoS.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
diff --git a/ace/QoS/QoS_Session_Factory.cpp b/ace/QoS/QoS_Session_Factory.cpp
index 7974038a0a9..d9a64c3eb8f 100644
--- a/ace/QoS/QoS_Session_Factory.cpp
+++ b/ace/QoS/QoS_Session_Factory.cpp
@@ -1,9 +1,12 @@
// QoS_Session_Factory.cpp
// $Id$
-#include "QoS_Session_Factory.h"
-#include "QoS_Session_Impl.h"
-#include "ace/Log_Msg.h"
+#include "ace/QoS/QoS_Session_Factory.h"
+#include "ace/QoS/QoS_Session_Impl.h"
+
+#ifdef ACE_SUBSET_0
+#include "ace/Logging/Log_Msg.h"
+#endif
ACE_RCSID(ace, QoS_Session_Factory, "$Id$")
@@ -38,6 +41,7 @@ ACE_QoS_Session_Factory::create_session (ACE_QoS_Session_Type qos_session_type)
ACE_GQoS_Session,
0);
+#ifdef ACE_SUBSET_0
if (this->add_session (qos_session) == -1)
{
delete qos_session;
@@ -45,7 +49,9 @@ ACE_QoS_Session_Factory::create_session (ACE_QoS_Session_Type qos_session_type)
ACE_LIB_TEXT ("Error in adding session\n")),
0);
}
-
+#else
+ this->add_session (qos_session);
+#endif
return qos_session;
}
@@ -54,11 +60,16 @@ int
ACE_QoS_Session_Factory::destroy_session (ACE_QoS_Session *qos_session)
{
+#ifdef ACE_SUBSET_0
if ((qos_session != 0) && (this->remove_session (qos_session) == -1))
ACE_ERROR_RETURN ((LM_ERROR,
ACE_LIB_TEXT ("Error in destroying session\n")),
-1);
-
+#else
+ if (qos_session != 0) {
+ this->remove_session(qos_session);
+ }
+#endif
return 0;
}
@@ -67,12 +78,15 @@ ACE_QoS_Session_Factory::destroy_session (ACE_QoS_Session *qos_session)
int
ACE_QoS_Session_Factory::add_session (ACE_QoS_Session *qos_session)
{
+#ifdef ACE_SUBSET_0
if (this->qos_session_set_.insert (qos_session) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_LIB_TEXT ("Error in adding a new session")
ACE_LIB_TEXT ("to the session set\n")),
-1);
-
+#else
+ this->qos_session_set_.insert (qos_session);
+#endif
return 0;
}
@@ -81,11 +95,14 @@ ACE_QoS_Session_Factory::add_session (ACE_QoS_Session *qos_session)
int
ACE_QoS_Session_Factory::remove_session (ACE_QoS_Session *qos_session)
{
+#ifdef ACE_SUBSET_0
if (this->qos_session_set_.remove (qos_session) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_LIB_TEXT ("Error in removing a session")
ACE_LIB_TEXT ("from the session set\n")),
-1);
-
+#else
+ this->qos_session_set_.remove (qos_session);
+#endif
return 0;
}
diff --git a/ace/QoS/QoS_Session_Factory.h b/ace/QoS/QoS_Session_Factory.h
index bb822fc4a3c..315816de73b 100644
--- a/ace/QoS/QoS_Session_Factory.h
+++ b/ace/QoS/QoS_Session_Factory.h
@@ -21,8 +21,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/Containers_T.h"
-#include "ACE_QoS_Export.h"
+#include "ace/Utils/Templates/Containers_T.h"
+#include "ace/QoS/ACE_QoS_Export.h"
/**
* @class ACE_QoS_Session;
diff --git a/ace/QoS/QoS_Session_Impl.cpp b/ace/QoS/QoS_Session_Impl.cpp
index 4a340861ab0..d3aca8140f9 100644
--- a/ace/QoS/QoS_Session_Impl.cpp
+++ b/ace/QoS/QoS_Session_Impl.cpp
@@ -1,13 +1,16 @@
// QoS_Session_Impl.cpp
// $Id$
-#include "ace/SOCK.h"
-#include "QoS_Manager.h"
-#include "QoS_Session_Impl.h"
-#include "ace/Log_Msg.h"
+#include "ace/Sockets/SOCK.h"
+#include "ace/QoS/QoS_Manager.h"
+#include "ace/QoS/QoS_Session_Impl.h"
+
+#ifdef ACE_SUBSET_0
+#include "ace/Logging/Log_Msg.h"
+#endif
#if !defined (__ACE_INLINE__)
-#include "QoS_Session_Impl.i"
+#include "ace/QoS/QoS_Session_Impl.i"
#endif /* __ACE_INLINE__ */
ACE_RCSID(ace, QoS_Session_Impl, "$Id$")
@@ -655,11 +658,15 @@ ACE_GQoS_Session::qos (ACE_SOCK *socket,
// Confirm if the current session is one of the QoS sessions
// subscribed to by the given socket.
+#ifdef ACE_SUBSET_0
if (qos_manager->qos_session_set ().find (this) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_LIB_TEXT ("This QoS session was not subscribed to")
ACE_LIB_TEXT (" by the socket\n")),
-1);
+#else
+ qos_manager->qos_session_set ().find (this);
+#endif
// Set the QOS according to the supplied ACE_QoS. The I/O control
// code used under the hood is SIO_SET_QOS.
@@ -667,6 +674,8 @@ ACE_GQoS_Session::qos (ACE_SOCK *socket,
u_long ret_bytes = 0;
ACE_QoS qos = ace_qos;
+
+#ifdef ACE_SUBSET_0
if (ACE_OS::ioctl (socket->get_handle (),
ACE_SIO_SET_QOS,
qos,
@@ -678,7 +687,12 @@ ACE_GQoS_Session::qos (ACE_SOCK *socket,
else
ACE_DEBUG ((LM_DEBUG,
ACE_LIB_TEXT ("Setting QoS with ACE_OS::ioctl () succeeds \n")));
-
+#else
+ ACE_OS::ioctl (socket->get_handle (),
+ ACE_SIO_SET_QOS,
+ qos,
+ &ret_bytes);
+#endif
return 0;
}
diff --git a/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp b/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp
index 8e0ccc96944..b250c870e9b 100644
--- a/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp
+++ b/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp
@@ -1,10 +1,13 @@
// $Id$
-#include "SOCK_Dgram_Mcast_QoS.h"
-#include "ace/Log_Msg.h"
+#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h"
+
+#ifdef ACE_SUBSET_0
+#include "ace/Logging/Log_Msg.h"
+#endif
#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "SOCK_Dgram_Mcast_QoS.i"
+#include "ace/QoS/SOCK_Dgram_Mcast_QoS.i"
#endif /* ACE_LACKS_INLINE_FUNCTIONS */
// This is a workaround for platforms with non-standard
@@ -46,11 +49,13 @@ ACE_SOCK_Dgram_Mcast_QoS::open (const ACE_Addr &addr,
// Only perform the <open> initialization if we haven't been opened
// earlier.
+ //
if (this->get_handle () == ACE_INVALID_HANDLE)
{
+#ifdef ACE_SUBSET_0
ACE_DEBUG ((LM_DEBUG,
"Get Handle Returns Invalid Handle\n"));
-
+#endif
if (ACE_SOCK::open (SOCK_DGRAM,
protocol_family,
protocol,
@@ -238,13 +243,18 @@ ACE_SOCK_Dgram_Mcast_QoS::subscribe (const ACE_INET_Addr &mcast_addr,
if (mcast_addr == qos_session->dest_addr ())
{
// Subscribe to the QoS session.
+#ifdef ACE_SUBSET_0
if (this->qos_manager_.join_qos_session (qos_session) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_LIB_TEXT ("Unable to join QoS Session\n")),
-1);
+#else
+ this->qos_manager_.join_qos_session (qos_session);
+#endif
}
else
{
+#ifdef ACE_SUBSET_0
if (this->close () != 0)
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("Unable to close socket\n")));
@@ -253,6 +263,8 @@ ACE_SOCK_Dgram_Mcast_QoS::subscribe (const ACE_INET_Addr &mcast_addr,
ACE_LIB_TEXT (" not match the address passed into")
ACE_LIB_TEXT (" subscribe\n")),
-1);
+#endif
+
}
sockaddr_in mult_addr;
diff --git a/ace/QoS/SOCK_Dgram_Mcast_QoS.h b/ace/QoS/SOCK_Dgram_Mcast_QoS.h
index f89909a570a..2d9496008c5 100644
--- a/ace/QoS/SOCK_Dgram_Mcast_QoS.h
+++ b/ace/QoS/SOCK_Dgram_Mcast_QoS.h
@@ -15,8 +15,8 @@
#define ACE_SOCK_DGRAM_MCAST_QOS_H
#include "ace/pre.h"
-#include "ace/SOCK_Dgram_Mcast.h"
-#include "QoS_Manager.h"
+#include "ace/Sockets/SOCK_Dgram_Mcast.h"
+#include "ace/QoS/QoS_Manager.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
@@ -130,7 +130,7 @@ private:
};
#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "SOCK_Dgram_Mcast_QoS.i"
+#include "ace/QoS/SOCK_Dgram_Mcast_QoS.i"
#endif /* ACE_LACKS_INLINE_FUNCTIONS */
#include "ace/post.h"
diff --git a/ace/Sockets/SOCK_Dgram.cpp b/ace/Sockets/SOCK_Dgram.cpp
index 741ad75f44e..4fa50ba60bb 100644
--- a/ace/Sockets/SOCK_Dgram.cpp
+++ b/ace/Sockets/SOCK_Dgram.cpp
@@ -1,14 +1,18 @@
// SOCK_Dgram.cpp
// $Id$
-#include "ace/SOCK_Dgram.h"
-#include "ace/Handle_Set.h"
-#include "ace/Synch.h"
-#include "ace/Log_Msg.h"
-#include "ace/INET_Addr.h"
+#include "ace/Sockets/SOCK_Dgram.h"
+#include "ace/OS/Handle_Set.h"
+#include "ace/Threads/Synch.h"
+
+#ifdef ACE_SUBSET_0
+#include "ace/Logging/Log_Msg.h"
+#endif
+
+#include "ace/IPC/INET_Addr.h"
#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram.i"
+#include "ace/Sockets/SOCK_Dgram.i"
#endif
ACE_RCSID(ace, SOCK_Dgram, "$Id$")
diff --git a/ace/Sockets/SOCK_Dgram.h b/ace/Sockets/SOCK_Dgram.h
index e227f9387af..8cd3ebf9965 100644
--- a/ace/Sockets/SOCK_Dgram.h
+++ b/ace/Sockets/SOCK_Dgram.h
@@ -15,14 +15,14 @@
#define ACE_SOCK_DGRAM_H
#include "ace/pre.h"
-#include "ace/SOCK.h"
-#include "ace/INET_Addr.h"
+#include "ace/Sockets/SOCK.h"
+#include "ace/IPC/INET_Addr.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/Addr.h"
+#include "ace/IPC/Addr.h"
/**
* @class ACE_SOCK_Dgram
@@ -207,7 +207,7 @@ private:
};
#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram.i"
+#include "ace/Sockets/SOCK_Dgram.i"
#endif
#include "ace/post.h"
diff --git a/ace/Sockets/SOCK_Dgram_Mcast.cpp b/ace/Sockets/SOCK_Dgram_Mcast.cpp
index 2ca7530b51b..3fb528eb2f7 100644
--- a/ace/Sockets/SOCK_Dgram_Mcast.cpp
+++ b/ace/Sockets/SOCK_Dgram_Mcast.cpp
@@ -1,10 +1,10 @@
// $Id$
-#include "ace/SOCK_Dgram_Mcast.h"
-#include "ace/INET_Addr.h"
+#include "ace/Sockets/SOCK_Dgram_Mcast.h"
+#include "ace/IPC/INET_Addr.h"
#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram_Mcast.i"
+#include "ace/Sockets/SOCK_Dgram_Mcast.i"
#endif /* ACE_LACKS_INLINE_FUNCTIONS */
// This is a workaround for platforms with non-standard
diff --git a/ace/Sockets/SOCK_Dgram_Mcast.h b/ace/Sockets/SOCK_Dgram_Mcast.h
index 7d9269f0bd4..67a566bf1fa 100644
--- a/ace/Sockets/SOCK_Dgram_Mcast.h
+++ b/ace/Sockets/SOCK_Dgram_Mcast.h
@@ -17,13 +17,13 @@
#define ACE_SOCK_DGRAM_MCAST_H
#include "ace/pre.h"
-#include "ace/SOCK_Dgram.h"
+#include "ace/Sockets/SOCK_Dgram.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/INET_Addr.h"
+#include "ace/IPC/INET_Addr.h"
/**
* @class ACE_SOCK_Dgram_Mcast
@@ -186,7 +186,7 @@ protected:
};
#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram_Mcast.i"
+#include "ace/Sockets/SOCK_Dgram_Mcast.i"
#endif /* ACE_LACKS_INLINE_FUNCTIONS */
#include "ace/post.h"
diff --git a/ace/Utils/Unbounded_Set.cpp b/ace/Utils/Unbounded_Set.cpp
index 6be82df6c64..808ed48351e 100644
--- a/ace/Utils/Unbounded_Set.cpp
+++ b/ace/Utils/Unbounded_Set.cpp
@@ -336,7 +336,9 @@ ACE_Unbounded_Set_Iterator<T>::operator* (void)
T *retv = 0;
int result = this->next (retv);
+#ifdef ACE_SUBSET_0
ACE_ASSERT (result != 0);
+#endif
ACE_UNUSED_ARG (result);
return *retv;