[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / XTI_ATM_Mcast.cpp
blob503e3fea0e27a65283e6e8658ccfe981d5edae4f
1 // $Id: XTI_ATM_Mcast.cpp 80826 2008-03-04 14:51:23Z wotte $
3 #include "ace/XTI_ATM_Mcast.h"
5 ACE_RCSID(ace, XTI_ATM_Mcast, "$Id: XTI_ATM_Mcast.cpp 80826 2008-03-04 14:51:23Z wotte $")
7 #if defined (ACE_HAS_XTI_ATM)
9 #if !defined (__ACE_INLINE__)
10 #include "ace/XTI_ATM_Mcast.inl"
11 #endif /* __ACE_INLINE__ */
13 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
15 ACE_ALLOC_HOOK_DEFINE(ACE_XTI_ATM_Mcast)
17 void
18 ACE_XTI_ATM_Mcast::dump (void) const
20 #if defined (ACE_HAS_DUMP)
21 ACE_TRACE ("ACE_XTI_ATM_Mcast::dump");
22 #endif /* ACE_HAS_DUMP */
25 ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast (void)
27 ACE_TRACE ("ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast");
30 // Add a leaf to the current connection (i.e., multicast).
32 int
33 ACE_XTI_ATM_Mcast::add_leaf (ACE_TLI_Stream &current_stream,
34 const ACE_Addr &remote_sap,
35 ACE_INT32 leaf_id,
36 ACE_Time_Value *timeout)
38 ACE_TRACE ("ACE_XTI_ATM_Mcast::add_leaf");
40 struct netbuf call_req;
41 memset(&call_req, 0, sizeof(call_req));
42 call_req.len = remote_sap.get_size ();
43 call_req.buf = (char *)remote_sap.get_addr ();
45 if (::t_addleaf(current_stream.get_handle(),
46 leaf_id,
47 &call_req) < 0)
49 // Check for asynchronous event
50 if (t_errno == TLOOK)
52 int const event = ACE_OS::t_look(current_stream.get_handle());
53 if (event != TNODATA && event != T_DATA)
54 return -1;
55 else
56 // If this doesn't work for asynchronous calls we need to call
57 // the XTI/ATM t_rcvleafchange() function to check for t_addleaf
58 // completion.
59 return complete (current_stream, 0, timeout);
61 else
62 return -1;
65 return 0;
68 ACE_END_VERSIONED_NAMESPACE_DECL
70 #endif /* ACE_HAS_XTI_ATM */