mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[10643] Update the ACE part we use to 5.8.2
Signed-off-by: Neo2003 <Neo.2003@Hotmail.fr>
This commit is contained in:
parent
8f71d95c0d
commit
23c920ca4b
739 changed files with 22031 additions and 40373 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: Service_Manager.cpp 82513 2008-08-05 18:52:53Z parsons $
|
||||
// $Id: Service_Manager.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Service_Manager.h"
|
||||
|
||||
|
|
@ -12,10 +12,6 @@
|
|||
#include "ace/OS_NS_stdio.h"
|
||||
#include "ace/OS_NS_string.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Service_Manager,
|
||||
"$Id: Service_Manager.cpp 82513 2008-08-05 18:52:53Z parsons $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
ACE_ALLOC_HOOK_DEFINE (ACE_Service_Manager)
|
||||
|
|
@ -68,7 +64,7 @@ ACE_Service_Manager::open (const ACE_INET_Addr &sia)
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +85,7 @@ ACE_Service_Manager::info (ACE_TCHAR **strp, size_t length) const
|
|||
sa.get_port_number (),
|
||||
ACE_TEXT ("tcp"),
|
||||
ACE_TEXT ("# lists all services in the daemon\n"));
|
||||
|
||||
|
||||
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
|
||||
{
|
||||
return -1;
|
||||
|
|
@ -98,7 +94,7 @@ ACE_Service_Manager::info (ACE_TCHAR **strp, size_t length) const
|
|||
{
|
||||
ACE_OS::strsncpy (*strp, buf, length);
|
||||
}
|
||||
|
||||
|
||||
return static_cast<int> (ACE_OS::strlen (buf));
|
||||
}
|
||||
|
||||
|
|
@ -143,7 +139,7 @@ ACE_Service_Manager::init (int argc, ACE_TCHAR *argv[])
|
|||
ACE_TEXT ("registering service with ACE_Reactor\n")),
|
||||
-1);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -160,18 +156,18 @@ ACE_Service_Manager::fini (void)
|
|||
ACE_TRACE ("ACE_Service_Manager::fini");
|
||||
|
||||
int retv = 0;
|
||||
|
||||
|
||||
if (this->get_handle () != ACE_INVALID_HANDLE)
|
||||
{
|
||||
retv =
|
||||
ACE_Reactor::instance ()->remove_handler (
|
||||
this,
|
||||
ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
|
||||
|
||||
|
||||
this->handle_close (ACE_INVALID_HANDLE,
|
||||
ACE_Event_Handler::NULL_MASK);
|
||||
}
|
||||
|
||||
|
||||
return retv;
|
||||
}
|
||||
|
||||
|
|
@ -227,7 +223,7 @@ ACE_Service_Manager::list_services (void)
|
|||
if (len > 0)
|
||||
{
|
||||
ssize_t n = this->client_stream_.send_n (buf, len);
|
||||
|
||||
|
||||
if (n <= 0 && errno != EPIPE)
|
||||
{
|
||||
ACE_ERROR ((LM_ERROR,
|
||||
|
|
@ -315,7 +311,7 @@ ACE_Service_Manager::handle_input (ACE_HANDLE)
|
|||
// created handle. This is because the newly created handle will
|
||||
// inherit the properties of the listen handle, including its event
|
||||
// associations.
|
||||
int reset_new_handle =
|
||||
bool reset_new_handle =
|
||||
ACE_Reactor::instance ()->uses_event_associations ();
|
||||
|
||||
if (this->acceptor_.accept (this->client_stream_, // stream
|
||||
|
|
@ -334,7 +330,7 @@ ACE_Service_Manager::handle_input (ACE_HANDLE)
|
|||
ACE_TEXT ("client_stream fd = %d\n"),
|
||||
this->client_stream_.get_handle ()));
|
||||
ACE_INET_Addr sa;
|
||||
|
||||
|
||||
if (this->client_stream_.get_remote_addr (sa) == -1)
|
||||
{
|
||||
return -1;
|
||||
|
|
@ -361,12 +357,12 @@ ACE_Service_Manager::handle_input (ACE_HANDLE)
|
|||
// contains an incomplete string.
|
||||
|
||||
int error;
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
result = client_stream_.recv (offset, remaining);
|
||||
error = errno;
|
||||
|
||||
|
||||
if (result == 0 && error != EWOULDBLOCK)
|
||||
{
|
||||
remaining = 0;
|
||||
|
|
@ -403,7 +399,7 @@ ACE_Service_Manager::handle_input (ACE_HANDLE)
|
|||
ACE_TEXT ("%p\n"),
|
||||
ACE_TEXT ("recv")));
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case 0:
|
||||
return 0;
|
||||
|
|
@ -430,7 +426,7 @@ ACE_Service_Manager::handle_input (ACE_HANDLE)
|
|||
ACE_TEXT ("%p\n"),
|
||||
ACE_TEXT ("close")));
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue