summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2000-12-22 20:58:16 +0000
committerbala <balanatarajan@users.noreply.github.com>2000-12-22 20:58:16 +0000
commit4154f6f60050515606b8c848bd1e20a40023dbfa (patch)
tree047de368e7bba742b2b98670e548e70c7d3c4c39
parente3a62b1466f58d406f23d2118f66a3e0184e671e (diff)
downloadATCD-4154f6f60050515606b8c848bd1e20a40023dbfa.tar.gz
ChangeLogTag: Fri Dec 22 14:56:24 2000 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a10
-rw-r--r--TAO/tao/IIOP_Transport.cpp12
-rw-r--r--TAO/tao/IIOP_Transport.h5
-rw-r--r--TAO/tao/operation_details.h11
-rw-r--r--TAO/tao/operation_details.i25
5 files changed, 47 insertions, 16 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 46bc61c3a1d..2c0daeab08d 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,13 @@
+Fri Dec 22 14:56:24 2000 Balachandran Natarajan <bala@cs.wustl.edu>
+
+ * tao/IIOP_Transport.h:
+ * tao/IIOP_Transport.cpp:
+ * tao/operation_details.h:
+ * tao/operation_details.cpp: Modified the request_id's so that we
+ have unique id's flying over the connection when we have
+ BiDirectional connections setup. This is as per the
+ recommendation of the BiDirectional GIOP sepc.
+
Fri Dec 22 13:00:42 2000 Balachandran Natarajan <bala@cs.wustl.edu>
* tests/BiDirectional/run_test.pl:
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index 5d0e7c3c1ad..e1b4a09b042 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -35,7 +35,7 @@ TAO_IIOP_Transport::TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler,
orb_core),
connection_handler_ (handler),
messaging_object_ (0),
- bidirectional_flag_ (0)
+ bidirectional_flag_ (-1)
{
if (flag)
{
@@ -310,14 +310,18 @@ TAO_IIOP_Transport::send_request_header (TAO_Operation_Details &opdetails,
// regarding this before...
if (this->orb_core ()->bidir_giop_policy () &&
this->messaging_object_->is_ready_for_bidirectional () &&
- this->bidirectional_flag_ == 0)
+ this->bidirectional_flag_ < 0)
{
this->set_bidir_context_info (opdetails);
- // Set the flag to 1
- this->bidirectional_flag_ = 1;
+ // Set the flag to 0
+ this->bidirectional_flag_ = 0;
}
+ // Modify the request id if we have BiDirectional client/server
+ // setup
+ opdetails.modify_request_id (this->bidirectional_flag_);
+
// We are going to pass on this request to the underlying messaging
// layer. It should take care of this request
if (this->messaging_object_->generate_request_header (opdetails,
diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h
index 51ed65c08ec..c6c5aa96b74 100644
--- a/TAO/tao/IIOP_Transport.h
+++ b/TAO/tao/IIOP_Transport.h
@@ -174,9 +174,10 @@ private:
/// than once on the connection. Why? Waste of marshalling and
/// demarshalling time on the client. On the server side, we need
/// this flag for this -- once a client that has established the
- /// connection asks the server to use the connection bith ways, we
+ /// connection asks the server to use the connection both ways, we
/// *dont* want the server to go pack service info to the
- /// client. That would be *bad*..
+ /// client. That would be *bad*.. The value of this flag will be 0
+ /// if the client sends info and 1 if the server receives the info.
int bidirectional_flag_;
};
diff --git a/TAO/tao/operation_details.h b/TAO/tao/operation_details.h
index 9fd29f9542b..ee22933810e 100644
--- a/TAO/tao/operation_details.h
+++ b/TAO/tao/operation_details.h
@@ -71,16 +71,21 @@ public:
void request_id (CORBA::ULong id);
+ /// Modify request id's for a BiDirectional setup
+ void modify_request_id (int flag);
+
/// Get for request id
CORBA::ULong request_id (void);
CORBA::ULong request_id (void) const;
+
+
/// Get method for the addressing mode
TAO_Target_Specification::TAO_Target_Address addressing_mode (void);
TAO_Target_Specification::TAO_Target_Address
addressing_mode (void) const;
- /// Set method for the addressing mode
+ /// Set method for the addressing mode
void
addressing_mode (CORBA::Short addr);
@@ -91,12 +96,12 @@ private:
/// Precalculated length of opname_.
CORBA::ULong opname_len_;
- /// Request ID of this operation.
+ /// Request ID of this operation.
CORBA::ULong request_id_;
/**
* Flag that indicates whether the operation has any arguments. If
- * there are any arguments the falg will have a value of 1, 0
+ * there are any arguments the flag will have a value of 1, 0
* otherwise.
*/
CORBA::Boolean argument_flag_;
diff --git a/TAO/tao/operation_details.i b/TAO/tao/operation_details.i
index cd293deb628..9135ba81b7d 100644
--- a/TAO/tao/operation_details.i
+++ b/TAO/tao/operation_details.i
@@ -2,8 +2,8 @@
//$Id$
ACE_INLINE
TAO_Operation_Details::TAO_Operation_Details (const char *name,
- CORBA::ULong len,
- CORBA::Boolean argument_flag)
+ CORBA::ULong len,
+ CORBA::Boolean argument_flag)
:opname_ (name),
opname_len_ (len),
request_id_ (0),
@@ -60,11 +60,22 @@ TAO_Operation_Details::service_context (void) const
ACE_INLINE void
-TAO_Operation_Details::request_id (CORBA::ULong id)
+TAO_Operation_Details::request_id (CORBA::ULong id)
{
this->request_id_ = id;
}
+ACE_INLINE void
+TAO_Operation_Details::modify_request_id (int flag)
+{
+ // If the flag value is -1 then BiDirectional connection has not
+ // been negotiated
+ if (flag >= 0)
+ {
+ this->request_id_ = (this->request_id_ * 2) + flag;
+ }
+}
+
ACE_INLINE CORBA::ULong
TAO_Operation_Details::request_id (void)
{
@@ -80,7 +91,7 @@ TAO_Operation_Details::request_id (void) const
ACE_INLINE void
TAO_Operation_Details::response_flags (CORBA::Octet flags)
{
- this->response_flags_ = flags;
+ this->response_flags_ = flags;
}
ACE_INLINE CORBA::Octet
@@ -109,12 +120,12 @@ TAO_Operation_Details::addressing_mode (void) const
ACE_INLINE void
TAO_Operation_Details::
- addressing_mode (CORBA::Short mode)
+ addressing_mode (CORBA::Short mode)
{
if (mode == 0)
this->addressing_mode_ = TAO_Target_Specification::Key_Addr;
- else if (mode == 1)
+ else if (mode == 1)
this->addressing_mode_ = TAO_Target_Specification::Profile_Addr;
- else if (mode == 2)
+ else if (mode == 2)
this->addressing_mode_ = TAO_Target_Specification::Reference_Addr;
}