summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-07-08 02:17:50 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-07-08 02:17:50 +0000
commited3a496ddc684f3ce227cbb218d78282efd99856 (patch)
tree3543bf2ecb70a30c23d3dfc3d0b0b0c87962a0ce
parentb669806ba736728989de1c82cbebd9874eec69e8 (diff)
downloadATCD-ed3a496ddc684f3ce227cbb218d78282efd99856.tar.gz
.
-rw-r--r--TAO/tao/ORB.cpp28
-rw-r--r--TAO/tao/orbconf.h9
2 files changed, 17 insertions, 20 deletions
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index 7be67c0d853..142a3f619c6 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -71,8 +71,6 @@ static const char file_prefix[] = "file://";
// Count of the number of ORBs.
int CORBA_ORB::orb_init_count_ = 0;
-// ****************************************************************
-
CORBA::Boolean
operator<< (TAO_OutputCDR &strm,
const CORBA::ORB::InvalidName &_tao_aggregate)
@@ -142,8 +140,6 @@ CORBA::Exception *CORBA::ORB::InvalidName::_alloc (void)
return new CORBA::ORB::InvalidName;
}
-// ****************************************************************
-
CORBA_ORB::CORBA_ORB (TAO_ORB_Core *orb_core)
: refcount_ (1),
open_called_ (0),
@@ -656,7 +652,7 @@ CORBA_ORB::resolve_implrepo_service (ACE_Time_Value *timeout,
}
int
-CORBA_ORB::multicast_query (char* &buf,
+CORBA_ORB::multicast_query (char *&buf,
const char *service_name,
u_short port,
ACE_Time_Value *timeout)
@@ -760,7 +756,7 @@ CORBA_ORB::multicast_query (char* &buf,
// IOR length.
CORBA::Short ior_len;
result = stream.recv_n (&ior_len,
- sizeof (ior_len),
+ sizeof ior_len,
0,
&tv);
if (result != sizeof (ior_len))
@@ -775,7 +771,7 @@ CORBA_ORB::multicast_query (char* &buf,
// Allocate more space for the ior if we don't
// have enough.
ior_len = ACE_NTOHS (ior_len);
- if (ior_len > 2*BUFSIZ)
+ if (ior_len > TAO_DEFAULT_IOR_SIZE)
{
buf = CORBA::string_alloc (ior_len);
if (buf == 0)
@@ -798,14 +794,11 @@ CORBA_ORB::multicast_query (char* &buf,
ACE_ERROR ((LM_ERROR,
"%p\n",
"error reading ior"));
- else
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "%s: service resolved to IOR <%s>\n",
- __FILE__,
- buf));
- }
+ else if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "%s: service resolved to IOR <%s>\n",
+ __FILE__,
+ buf));
}
}
}
@@ -829,12 +822,12 @@ CORBA_ORB::multicast_query (char* &buf,
// and we return NULL.
CORBA_Object_ptr
-CORBA_ORB::multicast_to_service (const char * service_name,
+CORBA_ORB::multicast_to_service (const char *service_name,
u_short port,
ACE_Time_Value *timeout,
CORBA::Environment& ACE_TRY_ENV)
{
- char buf[2*BUFSIZ];
+ char buf[TAO_DEFAULT_IOR_SIZE];
char *ior = buf;
CORBA::String_var cleaner;
@@ -1407,7 +1400,6 @@ CORBA_ORB::object_to_string (CORBA::Object_ptr obj,
// XXX there should be a simple way to reuse this code in other
// ORB implementations ...
- // @@ Is BUFSIZ the right size here?
char buf [ACE_CDR::DEFAULT_BUFSIZE];
#if defined(ACE_HAS_PURIFY)
(void) ACE_OS::memset (buf, '\0', sizeof(buf));
diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h
index b81e16b0646..1412a9f790a 100644
--- a/TAO/tao/orbconf.h
+++ b/TAO/tao/orbconf.h
@@ -393,10 +393,10 @@ and should not be set by the user. Please use TAO_HAS_REMOTE_POLICIES instead.
// it creates 1.1 endpoints (and profiles). If you need to talk to
// old clients that only understand 1.0 (and do not attempt to use 1.0
// with 1.1 servers), then change the values below.
-#if !defined(TAO_DEF_GIOP_MAJOR)
+#if !defined (TAO_DEF_GIOP_MAJOR)
#define TAO_DEF_GIOP_MAJOR 1
#endif /* TAO_DEF_GIOP_MAJOR */
-#if !defined(TAO_DEF_GIOP_MINOR)
+#if !defined (TAO_DEF_GIOP_MINOR)
#define TAO_DEF_GIOP_MINOR 1
#endif /* TAO_DEF_GIOP_MINOR */
@@ -404,4 +404,9 @@ and should not be set by the user. Please use TAO_HAS_REMOTE_POLICIES instead.
// (ORB_TYPE and CODE_SETS)
#define TAO_STD_PROFILE_COMPONENTS
+#if !defined (TAO_DEFAULT_IOR_SIZE)
+// This is the default size of the buffer used for processing IORs.
+#define TAO_DEFAULT_IOR_SIZE 1024
+#endif /* TAO_DEFAULT_IOR_SIZE */
+
#endif /* TAO_ORB_CONFIG_H */