summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-09-02 16:30:01 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-09-02 16:30:01 +0000
commit91c7073b31c7123fb551fdae3218aaf4f739d7b8 (patch)
tree867e2d70b216b2916c53fe270981bc1c0678c772
parent0d6c871ae1130d099b0efaa2bb71986c34d59055 (diff)
downloadATCD-91c7073b31c7123fb551fdae3218aaf4f739d7b8.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-98b13
-rw-r--r--ace/Filecache.h4
-rw-r--r--ace/Name_Proxy.cpp78
-rw-r--r--ace/Name_Request_Reply.cpp30
-rw-r--r--ace/Name_Request_Reply.h22
-rw-r--r--ace/Remote_Name_Space.cpp137
-rw-r--r--ace/Remote_Name_Space.h1
-rw-r--r--ace/Time_Request_Reply.h1
-rw-r--r--ace/Token_Request_Reply.h5
9 files changed, 173 insertions, 118 deletions
diff --git a/ChangeLog-98b b/ChangeLog-98b
index f2799e609bd..3b567ee82e3 100644
--- a/ChangeLog-98b
+++ b/ChangeLog-98b
@@ -1,3 +1,16 @@
+Wed Sep 2 11:10:08 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * netsvcs/lib/TS_Server_Handler.cpp (abandon): changed the use of
+ FAILURE to -1 to be consistent with the following change.
+
+ * ace/Time_Request_Reply: Removed the FAILURE constant enum. This
+ was rather pointless...
+
+ * ace/Name_Request_Reply.h (ACE_Name_Reply): Changed the type of
+ ACE_UINT32 type_ to ACE_INT32 so that it can hold values 0 and
+ -1. This will allow us to get rid of the horrible "SUCCESS" and
+ "FAILURE" macros...
+
Wed Sep 02 10:07:15 1998 David L. Levine <levine@cs.wustl.edu>
* ace/Name_Request_Reply.{h,cpp}: reverted ACE_SUCCESS to SUCCESS
diff --git a/ace/Filecache.h b/ace/Filecache.h
index 8306ffc6e00..b2ac229e0f2 100644
--- a/ace/Filecache.h
+++ b/ace/Filecache.h
@@ -114,7 +114,6 @@ public:
// The size of the file.
protected:
-
ACE_Filecache_Handle (void);
// Default do nothing constructor. Prevent it from being called.
@@ -122,8 +121,7 @@ protected:
// Common initializations for constructors.
public:
-
- // These come from ACE_Filecache_Object, which is an internal class.
+ // = These come from ACE_Filecache_Object, which is an internal class.
enum
{
ACE_SUCCESS = 0,
diff --git a/ace/Name_Proxy.cpp b/ace/Name_Proxy.cpp
index 9cebdb56541..333ae263a63 100644
--- a/ace/Name_Proxy.cpp
+++ b/ace/Name_Proxy.cpp
@@ -41,7 +41,9 @@ ACE_Name_Proxy::open (const ACE_INET_Addr &remote_addr,
timeout = (ACE_Time_Value *) options.time_value ();
// Initiate the connection.
- return this->connector_.connect (this->peer_, remote_addr, timeout);
+ return this->connector_.connect (this->peer_,
+ remote_addr,
+ timeout);
}
// Establish binding with the ACE_Name Server at remote_addr.
@@ -52,7 +54,9 @@ ACE_Name_Proxy::ACE_Name_Proxy (const ACE_INET_Addr &remote_addr,
ACE_TRACE ("ACE_Name_Proxy::ACE_Name_Proxy");
if (this->open (remote_addr, options) == -1
&& options[ACE_Synch_Options::USE_TIMEOUT] && errno != EWOULDBLOCK)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Name_Proxy::ACE_Name_Proxy")));
+ ACE_ERROR ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("ACE_Name_Proxy::ACE_Name_Proxy")));
}
// Obtain underlying handle.
@@ -68,28 +72,39 @@ int
ACE_Name_Proxy::request_reply (ACE_Name_Request &request)
{
ACE_TRACE ("ACE_Name_Proxy::request_reply");
- void *buffer;
- ssize_t length;
+ void *buffer;
+ ssize_t length = length = request.encode (buffer);
- if ((length = request.encode (buffer)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("encode failed")), -1);
+ if (length == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("encode failed")),
+ -1);
// Transmit request via a blocking send.
if (this->peer_.send_n (buffer, length) != length)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("send_n failed")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("send_n failed")),
+ -1);
else
{
ACE_Name_Reply reply;
// Receive reply via blocking read.
- if (this->peer_.recv_n (&reply, sizeof reply) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("recv failed")), -1);
-
+ if (this->peer_.recv_n (&reply,
+ sizeof reply) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("recv failed")),
+ -1);
else if (reply.decode () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("decode failed")), -1);
-
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("decode failed")),
+ -1);
errno = int (reply.errnum ());
return reply.status ();
}
@@ -100,16 +115,21 @@ ACE_Name_Proxy::send_request (ACE_Name_Request &request)
{
ACE_TRACE ("ACE_Name_Proxy::send_request");
void *buffer;
- ssize_t length;
+ ssize_t length = request.encode (buffer);
- if ((length = request.encode (buffer)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("encode failed")), -1);
+ if (length == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("encode failed")),
+ -1);
// Transmit request via a blocking send.
else if (this->peer_.send_n (buffer, length) != length)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("send_n failed")), -1);
-
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("send_n failed")),
+ -1);
return 0;
}
@@ -117,19 +137,23 @@ int
ACE_Name_Proxy::recv_reply (ACE_Name_Request &reply)
{
ACE_TRACE ("ACE_Name_Proxy::recv_reply");
- // Read the first 4 bytes to get the length of the message
- // This implementation assumes that the first 4 bytes are
- // the length of the message.
+ // Read the first 4 bytes to get the length of the message This
+ // implementation assumes that the first 4 bytes are the length of
+ // the message.
ssize_t n = this->peer_.recv ((void *) &reply, sizeof (ACE_UINT32));
switch (n)
{
case -1:
// FALLTHROUGH
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("****************** recv_reply returned -1\n")));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("****************** recv_reply returned -1\n")));
default:
- ACE_ERROR ((LM_ERROR, "%p got %d bytes, expected %d bytes\n",
- "recv failed", n, sizeof (ACE_UINT32)));
+ ACE_ERROR ((LM_ERROR,
+ "%p got %d bytes, expected %d bytes\n",
+ "recv failed",
+ n,
+ sizeof (ACE_UINT32)));
// FALLTHROUGH
case 0:
// We've shutdown unexpectedly
@@ -150,14 +174,18 @@ ACE_Name_Proxy::recv_reply (ACE_Name_Request &reply)
if (n != ssize_t (length - sizeof (ACE_UINT32)))
{
ACE_ERROR ((LM_ERROR, "%p expected %d, got %d\n",
- "invalid length", length, n));
+ "invalid length",
+ length,
+ n));
return -1;
}
// Decode the request into host byte order.
if (reply.decode () == -1)
{
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("decode failed")));
+ ACE_ERROR ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("decode failed")));
return -1;
}
}
diff --git a/ace/Name_Request_Reply.cpp b/ace/Name_Request_Reply.cpp
index af96698cd9d..07f7e27176f 100644
--- a/ace/Name_Request_Reply.cpp
+++ b/ace/Name_Request_Reply.cpp
@@ -408,19 +408,25 @@ ACE_Name_Reply::msg_type (ACE_UINT32 t)
this->transfer_.type_ = t;
}
-// = Set/get the status of the reply (0 == success, -1 == failure).
-ACE_UINT32
+// Get the status of the reply (0 == success, -1 == failure).
+
+ACE_INT32
ACE_Name_Reply::status (void) const
{
ACE_TRACE ("ACE_Name_Reply::status");
- return this->transfer_.type_ == ACE_Name_Reply::ACE_SUCCESS ? 0 : -1;
+ return this->transfer_.type_;
}
+// Set the status of the reply (0 == success, -1 == failure).
+
void
-ACE_Name_Reply::status (ACE_UINT32 s)
+ACE_Name_Reply::status (ACE_INT32 s)
{
ACE_TRACE ("ACE_Name_Reply::status");
- this->transfer_.type_ = s == (ACE_UINT32) -1 ? ACE_Name_Reply::ACE_FAILURE : ACE_Name_Reply::ACE_SUCCESS;
+ if (s == -1)
+ this->transfer_.type_ = -1;
+ else
+ this->transfer_.type_ = 0;
}
// = Set/get the errno of a failed reply.
@@ -479,14 +485,18 @@ ACE_Name_Reply::dump (void) const
switch (this->msg_type ())
{
- case ACE_Name_Reply::ACE_SUCCESS:
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("SUCCESS\n")));
+ case 0:
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("SUCCESS\n")));
break;
- case ACE_Name_Reply::ACE_FAILURE:
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("FAILURE\n")));
+ case -1:
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("FAILURE\n")));
break;
default:
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("<unknown type> = %d\n"), this->msg_type ()));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("<unknown type> = %d\n"),
+ this->msg_type ()));
break;
}
}
diff --git a/ace/Name_Request_Reply.h b/ace/Name_Request_Reply.h
index 7c680d2ed61..238b7202099 100644
--- a/ace/Name_Request_Reply.h
+++ b/ace/Name_Request_Reply.h
@@ -36,7 +36,7 @@ class ACE_Export ACE_Name_Request
public:
enum Constants
{
- /* Request message types. */
+ // Request message types.
BIND = 01,
REBIND = 02,
RESOLVE = 03,
@@ -186,11 +186,7 @@ class ACE_Export ACE_Name_Reply
public:
enum Constants
{
- /* Reply message types. */
- ACE_SUCCESS = 1, // Reply for successful operation.
- ACE_FAILURE = 2, // Reply for failed operation.
-
- /* Class-specific constant values. */
+ // Class-specific constant values.
MAX_NAME_LENGTH = MAXPATHLEN + 1
};
@@ -213,8 +209,8 @@ public:
void msg_type (ACE_UINT32);
// = Set/get the status of the reply (0 == success, -1 == failure).
- ACE_UINT32 status (void) const;
- void status (ACE_UINT32);
+ ACE_INT32 status (void) const;
+ void status (ACE_INT32);
// = Set/get the errno of a failed reply.
ACE_UINT32 errnum (void) const;
@@ -237,13 +233,13 @@ private:
ACE_UINT32 length_;
// Length of entire reply.
- ACE_UINT32 type_;
- // Type of the reply (i.e., <SUCCESS> or <FAILURE>).
+ ACE_INT32 type_;
+ // Type of the reply, i.e., success (0) or failure (-1).
ACE_UINT32 errno_;
- // Indicates why error occurred if <this->type_> == <FAILURE>.
- // Typical reasons include:
- // <ETIME> (if the client timed out after waiting for the name).
+ // Indicates why error occurred if <this->type_> == failure (-1).
+ // Typical reasons include: <ETIME> (if the client timed out after
+ // waiting for the name).
};
Transfer transfer_;
diff --git a/ace/Remote_Name_Space.cpp b/ace/Remote_Name_Space.cpp
index 4da37aa61f5..cbd886b0d13 100644
--- a/ace/Remote_Name_Space.cpp
+++ b/ace/Remote_Name_Space.cpp
@@ -42,14 +42,14 @@ ACE_Remote_Name_Space::bind (const ACE_WString &name,
const char *type)
{
ACE_TRACE ("ACE_Remote_Name_Space::bind");
- ACE_Name_Request request (ACE_Name_Request::BIND, name.fast_rep (),
+ ACE_Name_Request request (ACE_Name_Request::BIND,
+ name.fast_rep (),
name.length () * sizeof (ACE_USHORT16),
value.fast_rep (),
value.length () * sizeof (ACE_USHORT16),
type,
ACE_OS::strlen (type));
- int result = this->ns_proxy_.request_reply (request);
- return result == ACE_Name_Reply::ACE_SUCCESS ? 0 : result;
+ return this->ns_proxy_.request_reply (request);
}
int
@@ -58,14 +58,14 @@ ACE_Remote_Name_Space::rebind (const ACE_WString &name,
const char *type)
{
ACE_TRACE ("ACE_Remote_Name_Space::rebind");
- ACE_Name_Request request (ACE_Name_Request::REBIND, name.fast_rep (),
+ ACE_Name_Request request (ACE_Name_Request::REBIND,
+ name.fast_rep (),
name.length () * sizeof (ACE_USHORT16),
value.fast_rep (),
value.length () * sizeof (ACE_USHORT16),
type,
ACE_OS::strlen (type));
- int result = this->ns_proxy_.request_reply (request);
- return result == ACE_Name_Reply::ACE_SUCCESS ? 0 : result;
+ return this->ns_proxy_.request_reply (request);
}
int
@@ -74,7 +74,8 @@ ACE_Remote_Name_Space::resolve (const ACE_WString &name,
char *&type)
{
ACE_TRACE ("ACE_Remote_Name_Space::resolve");
- ACE_Name_Request request (ACE_Name_Request::RESOLVE, name.fast_rep (),
+ ACE_Name_Request request (ACE_Name_Request::RESOLVE,
+ name.fast_rep (),
name.length () * sizeof (ACE_USHORT16),
0, 0, 0, 0);
@@ -88,9 +89,10 @@ ACE_Remote_Name_Space::resolve (const ACE_WString &name,
ACE_WString temp (reply.value (), reply.value_len () / sizeof (ACE_USHORT16));
value = temp;
- ACE_NEW_RETURN (type, char[reply.type_len ()+1], -1);
+ ACE_NEW_RETURN (type,
+ char[reply.type_len () + 1],
+ -1);
ACE_OS::strcpy (type, reply.type ());
-
return 0;
}
@@ -98,12 +100,11 @@ int
ACE_Remote_Name_Space::unbind (const ACE_WString &name)
{
ACE_TRACE ("ACE_Remote_Name_Space::unbind");
- ACE_Name_Request request (ACE_Name_Request::UNBIND, name.fast_rep (),
+ ACE_Name_Request request (ACE_Name_Request::UNBIND,
+ name.fast_rep (),
name.length () * sizeof (ACE_USHORT16),
0, 0, 0, 0);
-
- int result = this->ns_proxy_.request_reply (request);
- return result == ACE_Name_Reply::ACE_SUCCESS ? 0 : result;
+ return this->ns_proxy_.request_reply (request);
}
int
@@ -111,10 +112,10 @@ ACE_Remote_Name_Space::list_names (ACE_WSTRING_SET &set,
const ACE_WString &pattern)
{
ACE_TRACE ("ACE_Remote_Name_Space::list_names");
- ACE_Name_Request request (ACE_Name_Request::LIST_NAMES, pattern.fast_rep (),
+ ACE_Name_Request request (ACE_Name_Request::LIST_NAMES,
+ pattern.fast_rep (),
pattern.length () * sizeof (ACE_USHORT16),
0, 0, 0, 0);
-
if (this->ns_proxy_.send_request (request) == -1)
return -1;
@@ -123,13 +124,14 @@ ACE_Remote_Name_Space::list_names (ACE_WSTRING_SET &set,
while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
if (this->ns_proxy_.recv_reply (reply) == -1)
- {
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Remote_Name_Space::list_names")));
- return -1;
- }
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("ACE_Remote_Name_Space::list_names")),
+ -1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
- ACE_WString name (reply.name (), reply.name_len () / sizeof (ACE_USHORT16));
+ ACE_WString name (reply.name (),
+ reply.name_len () / sizeof (ACE_USHORT16));
set.insert (name);
}
}
@@ -141,10 +143,10 @@ ACE_Remote_Name_Space::list_values (ACE_WSTRING_SET &set,
const ACE_WString &pattern)
{
ACE_TRACE ("ACE_Remote_Name_Space::list_values");
- ACE_Name_Request request (ACE_Name_Request::LIST_VALUES, pattern.fast_rep (),
+ ACE_Name_Request request (ACE_Name_Request::LIST_VALUES,
+ pattern.fast_rep (),
pattern.length () * sizeof (ACE_USHORT16),
0, 0, 0, 0);
-
if (this->ns_proxy_.send_request (request) == -1)
return -1;
@@ -153,16 +155,18 @@ ACE_Remote_Name_Space::list_values (ACE_WSTRING_SET &set,
while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
if (this->ns_proxy_.recv_reply (reply) == -1)
- {
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Remote_Name_Space::list_values")));
- return -1;
- }
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("ACE_Remote_Name_Space::list_values")),
+ -1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
- ACE_WString value (reply.value (), reply.value_len () / sizeof (ACE_USHORT16));
+ ACE_WString value (reply.value (),
+ reply.value_len () / sizeof (ACE_USHORT16));
set.insert (value);
}
}
+
return 0;
}
@@ -171,7 +175,8 @@ ACE_Remote_Name_Space::list_types (ACE_WSTRING_SET &set,
const ACE_WString &pattern)
{
ACE_TRACE ("ACE_Remote_Name_Space::list_types");
- ACE_Name_Request request (ACE_Name_Request::LIST_TYPES, pattern.fast_rep (),
+ ACE_Name_Request request (ACE_Name_Request::LIST_TYPES,
+ pattern.fast_rep (),
pattern.length () * sizeof (ACE_USHORT16),
0, 0, 0, 0);
@@ -183,16 +188,17 @@ ACE_Remote_Name_Space::list_types (ACE_WSTRING_SET &set,
while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
if (this->ns_proxy_.recv_reply (reply) == -1)
- {
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Remote_Name_Space::list_values")));
- return -1;
- }
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("ACE_Remote_Name_Space::list_values")),
+ -1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
ACE_WString type (reply.type ());
set.insert (type);
}
}
+
return 0;
}
@@ -201,7 +207,8 @@ ACE_Remote_Name_Space::list_name_entries (ACE_BINDING_SET &set,
const ACE_WString &pattern)
{
ACE_TRACE ("ACE_Remote_Name_Space::list_names");
- ACE_Name_Request request (ACE_Name_Request::LIST_NAME_ENTRIES, pattern.fast_rep (),
+ ACE_Name_Request request (ACE_Name_Request::LIST_NAME_ENTRIES,
+ pattern.fast_rep (),
pattern.length () * sizeof (ACE_USHORT16),
0, 0, 0, 0);
@@ -213,16 +220,19 @@ ACE_Remote_Name_Space::list_name_entries (ACE_BINDING_SET &set,
while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
if (this->ns_proxy_.recv_reply (reply) == -1)
- {
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Remote_Name_Space::list_names")));
- return -1;
- }
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("ACE_Remote_Name_Space::list_names")),
+ -1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
- ACE_WString name (reply.name (), reply.name_len () / sizeof (ACE_USHORT16));
- ACE_WString value (reply.value (), reply.value_len () / sizeof (ACE_USHORT16));
- ACE_Name_Binding entry (name, value, reply.type ());
-
+ ACE_WString name (reply.name (),
+ reply.name_len () / sizeof (ACE_USHORT16));
+ ACE_WString value (reply.value (),
+ reply.value_len () / sizeof (ACE_USHORT16));
+ ACE_Name_Binding entry (name,
+ value,
+ reply.type ());
if (set.insert (entry) == -1)
return -1;
}
@@ -235,7 +245,8 @@ ACE_Remote_Name_Space::list_value_entries (ACE_BINDING_SET &set,
const ACE_WString &pattern)
{
ACE_TRACE ("ACE_Remote_Name_Space::list_values");
- ACE_Name_Request request (ACE_Name_Request::LIST_VALUE_ENTRIES, pattern.fast_rep (),
+ ACE_Name_Request request (ACE_Name_Request::LIST_VALUE_ENTRIES,
+ pattern.fast_rep (),
pattern.length () * sizeof (ACE_USHORT16),
0, 0, 0, 0);
@@ -247,16 +258,19 @@ ACE_Remote_Name_Space::list_value_entries (ACE_BINDING_SET &set,
while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
if (this->ns_proxy_.recv_reply (reply) == -1)
- {
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Remote_Name_Space::list_values")));
- return -1;
- }
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("ACE_Remote_Name_Space::list_values")),
+ -1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
- ACE_WString name (reply.name (), reply.name_len () / sizeof (ACE_USHORT16));
- ACE_WString value (reply.value (), reply.value_len () / sizeof (ACE_USHORT16));
- ACE_Name_Binding entry (name, value, reply.type());
-
+ ACE_WString name (reply.name (),
+ reply.name_len () / sizeof (ACE_USHORT16));
+ ACE_WString value (reply.value (),
+ reply.value_len () / sizeof (ACE_USHORT16));
+ ACE_Name_Binding entry (name,
+ value,
+ reply.type());
if (set.insert (entry) == -1)
return -1;
}
@@ -269,7 +283,8 @@ ACE_Remote_Name_Space::list_type_entries (ACE_BINDING_SET &set,
const ACE_WString &pattern)
{
ACE_TRACE ("ACE_Remote_Name_Space::list_types");
- ACE_Name_Request request (ACE_Name_Request::LIST_TYPE_ENTRIES, pattern.fast_rep (),
+ ACE_Name_Request request (ACE_Name_Request::LIST_TYPE_ENTRIES,
+ pattern.fast_rep (),
pattern.length () * sizeof (ACE_USHORT16),
0, 0, 0, 0);
@@ -281,16 +296,19 @@ ACE_Remote_Name_Space::list_type_entries (ACE_BINDING_SET &set,
while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
if (this->ns_proxy_.recv_reply (reply) == -1)
- {
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Remote_Name_Space::list_values")));
- return -1;
- }
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("ACE_Remote_Name_Space::list_values")),
+ -1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
- ACE_WString name (reply.name (), reply.name_len () / sizeof (ACE_USHORT16));
- ACE_WString value (reply.value (), reply.value_len () / sizeof (ACE_USHORT16));
- ACE_Name_Binding entry (name, value, reply.type());
-
+ ACE_WString name (reply.name (),
+ reply.name_len () / sizeof (ACE_USHORT16));
+ ACE_WString value (reply.value (),
+ reply.value_len () / sizeof (ACE_USHORT16));
+ ACE_Name_Binding entry (name,
+ value,
+ reply.type ());
if (set.insert (entry) == -1)
return -1;
}
@@ -298,7 +316,6 @@ ACE_Remote_Name_Space::list_type_entries (ACE_BINDING_SET &set,
return 0;
}
-
ACE_Remote_Name_Space::~ACE_Remote_Name_Space (void)
{
ACE_TRACE ("ACE_Remote_Name_Space::~ACE_Remote_Name_Space");
diff --git a/ace/Remote_Name_Space.h b/ace/Remote_Name_Space.h
index 0131411670c..afc5ce3f414 100644
--- a/ace/Remote_Name_Space.h
+++ b/ace/Remote_Name_Space.h
@@ -118,7 +118,6 @@ public:
// Dump the state of the object.
private:
-
ACE_Name_Proxy ns_proxy_;
// Interface to Name server process for NET_LOCAL namespace.
};
diff --git a/ace/Time_Request_Reply.h b/ace/Time_Request_Reply.h
index 0f648fb9751..1d1e99b3834 100644
--- a/ace/Time_Request_Reply.h
+++ b/ace/Time_Request_Reply.h
@@ -38,7 +38,6 @@ public:
{
// Request message types.
TIME_UPDATE = 01,
- FAILURE = 05,
// Class-specific constant values.
MAX_TIME_LEN = MAXPATHLEN + 1
diff --git a/ace/Token_Request_Reply.h b/ace/Token_Request_Reply.h
index a8cdd458e2e..c11ef24fba2 100644
--- a/ace/Token_Request_Reply.h
+++ b/ace/Token_Request_Reply.h
@@ -172,11 +172,6 @@ class ACE_Export ACE_Token_Reply
// This class is implemented to minimize data copying.
// In particular, all marshaling is done in situ...
public:
- enum Constants
- {
- ACE_SUCCESS = 0 // this MUST be zero!!!
- };
-
ACE_Token_Reply (void);
// Default constructor.