Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / XTI_ATM_Mcast.cpp
blob329b0a30f6f187be03420bc43c3ec76f4370eeae
1 #include "ace/XTI_ATM_Mcast.h"
3 #if defined (ACE_HAS_XTI_ATM)
5 #if !defined (__ACE_INLINE__)
6 #include "ace/XTI_ATM_Mcast.inl"
7 #endif /* __ACE_INLINE__ */
9 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
11 ACE_ALLOC_HOOK_DEFINE(ACE_XTI_ATM_Mcast)
13 void
14 ACE_XTI_ATM_Mcast::dump () const
16 #if defined (ACE_HAS_DUMP)
17 ACE_TRACE ("ACE_XTI_ATM_Mcast::dump");
18 #endif /* ACE_HAS_DUMP */
21 ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast ()
23 ACE_TRACE ("ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast");
26 // Add a leaf to the current connection (i.e., multicast).
28 int
29 ACE_XTI_ATM_Mcast::add_leaf (ACE_TLI_Stream &current_stream,
30 const ACE_Addr &remote_sap,
31 ACE_INT32 leaf_id,
32 ACE_Time_Value *timeout)
34 ACE_TRACE ("ACE_XTI_ATM_Mcast::add_leaf");
36 struct netbuf call_req;
37 memset(&call_req, 0, sizeof(call_req));
38 call_req.len = remote_sap.get_size ();
39 call_req.buf = (char *)remote_sap.get_addr ();
41 if (::t_addleaf(current_stream.get_handle(),
42 leaf_id,
43 &call_req) < 0)
45 // Check for asynchronous event
46 if (t_errno == TLOOK)
48 int const event = ACE_OS::t_look(current_stream.get_handle());
49 if (event != TNODATA && event != T_DATA)
50 return -1;
51 else
52 // If this doesn't work for asynchronous calls we need to call
53 // the XTI/ATM t_rcvleafchange() function to check for t_addleaf
54 // completion.
55 return complete (current_stream, 0, timeout);
57 else
58 return -1;
61 return 0;
64 ACE_END_VERSIONED_NAMESPACE_DECL
66 #endif /* ACE_HAS_XTI_ATM */