summaryrefslogtreecommitdiff
path: root/ace/QoS
diff options
context:
space:
mode:
authoryamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-08-05 04:51:40 +0000
committeryamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-08-05 04:51:40 +0000
commit76e4b6f9e127a2a11b8fa07d82cd09f8a3cf4862 (patch)
tree050282a72174e1555baa73e6c5f5d86628a066c8 /ace/QoS
parentfc01b8db05b4c8c6827f55a5b70d07e63803146c (diff)
downloadATCD-76e4b6f9e127a2a11b8fa07d82cd09f8a3cf4862.tar.gz
ChangeLogTag: Fri Aug 04 3:33:31 2001 Yamuna Krishnamurthy <yamuna@cs.wustl.edu>
Diffstat (limited to 'ace/QoS')
-rw-r--r--ace/QoS/SOCK_Dgram_Mcast_QoS.cpp48
-rw-r--r--ace/QoS/SOCK_Dgram_Mcast_QoS.h10
2 files changed, 32 insertions, 26 deletions
diff --git a/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp b/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp
index 96447d72d7a..8e0ccc96944 100644
--- a/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp
+++ b/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp
@@ -25,7 +25,7 @@ ACE_SOCK_Dgram_Mcast_QoS::ACE_SOCK_Dgram_Mcast_QoS (void)
}
int
-ACE_SOCK_Dgram_Mcast_QoS::open (const ACE_Addr &mcast_addr,
+ACE_SOCK_Dgram_Mcast_QoS::open (const ACE_Addr &addr,
const ACE_QoS_Params &qos_params,
int protocol_family,
int protocol,
@@ -42,12 +42,15 @@ ACE_SOCK_Dgram_Mcast_QoS::open (const ACE_Addr &mcast_addr,
// Note: Sun C++ 4.2 needs the useless const_cast.
this->mcast_addr_.set (ACE_reinterpret_cast (const ACE_INET_Addr &,
ACE_const_cast (ACE_Addr &,
- mcast_addr)));
+ addr)));
// Only perform the <open> initialization if we haven't been opened
// earlier.
if (this->get_handle () == ACE_INVALID_HANDLE)
{
+ ACE_DEBUG ((LM_DEBUG,
+ "Get Handle Returns Invalid Handle\n"));
+
if (ACE_SOCK::open (SOCK_DGRAM,
protocol_family,
protocol,
@@ -233,28 +236,27 @@ ACE_SOCK_Dgram_Mcast_QoS::subscribe (const ACE_INET_Addr &mcast_addr,
// Check if the mcast_addr passed into this method is the
// same as the QoS session address.
if (mcast_addr == qos_session->dest_addr ())
- {
- // Subscribe to the QoS session.
- 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);
- }
+ {
+ // Subscribe to the QoS session.
+ 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
- {
- if (this->close () != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_LIB_TEXT ("Unable to close socket\n")));
-
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_LIB_TEXT ("Dest Addr in the QoS Session does")
- ACE_LIB_TEXT (" not match the address passed into")
- ACE_LIB_TEXT (" subscribe\n")),
- -1);
- }
+ {
+ if (this->close () != 0)
+ ACE_ERROR ((LM_ERROR,
+ ACE_LIB_TEXT ("Unable to close socket\n")));
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_LIB_TEXT ("Dest Addr in the QoS Session does")
+ ACE_LIB_TEXT (" not match the address passed into")
+ ACE_LIB_TEXT (" subscribe\n")),
+ -1);
+ }
sockaddr_in mult_addr;
-
+
if (protocol_family == ACE_FROM_PROTOCOL_INFO)
mult_addr.sin_family = protocolinfo->iAddressFamily;
else
@@ -279,3 +281,7 @@ ACE_SOCK_Dgram_Mcast_QoS::subscribe (const ACE_INET_Addr &mcast_addr,
return 0;
}
}
+
+
+
+
diff --git a/ace/QoS/SOCK_Dgram_Mcast_QoS.h b/ace/QoS/SOCK_Dgram_Mcast_QoS.h
index 68931847b0d..f89909a570a 100644
--- a/ace/QoS/SOCK_Dgram_Mcast_QoS.h
+++ b/ace/QoS/SOCK_Dgram_Mcast_QoS.h
@@ -102,11 +102,7 @@ public:
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
-private:
- // = Disable public <open> method to ensure class used properly.
-
- /// Not publically visible.
- int open (const ACE_Addr &mcast_addr,
+ int open (const ACE_Addr &addr,
const ACE_QoS_Params &qos_params,
int protocol_family = PF_INET,
int protocol = 0,
@@ -115,6 +111,10 @@ private:
u_long flags = 0,
int reuse_addr = 0);
+private:
+ // = Disable public <open> method to ensure class used properly.
+
+
/// Subscribe to the multicast interface using QoS-enabled semantics.
int subscribe_ifs (const ACE_INET_Addr &mcast_addr,
const ACE_QoS_Params &qos_params,