Removed ACE_HAS_BSTRING, not used
[ACE_TAO.git] / ACE / ace / XTI_ATM_Mcast.cpp
blob44da82975ac7b7ceed211dbb4786e7af9e9da342
1 #include "ace/XTI_ATM_Mcast.h"
5 #if defined (ACE_HAS_XTI_ATM)
7 #if !defined (__ACE_INLINE__)
8 #include "ace/XTI_ATM_Mcast.inl"
9 #endif /* __ACE_INLINE__ */
11 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
13 ACE_ALLOC_HOOK_DEFINE(ACE_XTI_ATM_Mcast)
15 void
16 ACE_XTI_ATM_Mcast::dump (void) const
18 #if defined (ACE_HAS_DUMP)
19 ACE_TRACE ("ACE_XTI_ATM_Mcast::dump");
20 #endif /* ACE_HAS_DUMP */
23 ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast (void)
25 ACE_TRACE ("ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast");
28 // Add a leaf to the current connection (i.e., multicast).
30 int
31 ACE_XTI_ATM_Mcast::add_leaf (ACE_TLI_Stream &current_stream,
32 const ACE_Addr &remote_sap,
33 ACE_INT32 leaf_id,
34 ACE_Time_Value *timeout)
36 ACE_TRACE ("ACE_XTI_ATM_Mcast::add_leaf");
38 struct netbuf call_req;
39 memset(&call_req, 0, sizeof(call_req));
40 call_req.len = remote_sap.get_size ();
41 call_req.buf = (char *)remote_sap.get_addr ();
43 if (::t_addleaf(current_stream.get_handle(),
44 leaf_id,
45 &call_req) < 0)
47 // Check for asynchronous event
48 if (t_errno == TLOOK)
50 int const event = ACE_OS::t_look(current_stream.get_handle());
51 if (event != TNODATA && event != T_DATA)
52 return -1;
53 else
54 // If this doesn't work for asynchronous calls we need to call
55 // the XTI/ATM t_rcvleafchange() function to check for t_addleaf
56 // completion.
57 return complete (current_stream, 0, timeout);
59 else
60 return -1;
63 return 0;
66 ACE_END_VERSIONED_NAMESPACE_DECL
68 #endif /* ACE_HAS_XTI_ATM */