summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2003-07-09 19:35:43 +0000
committerbala <balanatarajan@users.noreply.github.com>2003-07-09 19:35:43 +0000
commitfef0537e5e005f0c6ae7b5049d3b18c73fe37a49 (patch)
tree72b28f02b2b71278f25fd9bee1158ffea5087555
parent9f5c76d84be682d124e96a9fc71e81ad6e285ee5 (diff)
downloadATCD-fef0537e5e005f0c6ae7b5049d3b18c73fe37a49.tar.gz
ChangeLogTag:Wed Jul 9 14:33:17 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
-rw-r--r--TAO/ChangeLog_ref14
-rw-r--r--TAO/tao/IIOP_Connector.cpp2
-rw-r--r--TAO/tao/Invocation_Base.cpp14
-rw-r--r--TAO/tao/Remote_Invocation.cpp27
-rw-r--r--TAO/tao/Remote_Invocation.h6
-rw-r--r--TAO/tao/Synch_Invocation.cpp101
-rw-r--r--TAO/tao/Synch_Invocation.h14
7 files changed, 98 insertions, 80 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref
index a756c8f40c3..9fefe9dc5d8 100644
--- a/TAO/ChangeLog_ref
+++ b/TAO/ChangeLog_ref
@@ -1,3 +1,17 @@
+Wed Jul 9 14:33:17 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * tao/Remote_Invocation.cpp (TAO):
+ * tao/Remote_Invocation.h: Added some error checking in
+ send_message ().
+
+ * tao/Synch_Invocation.h:
+ * tao/Synch_Invocation.cpp: Changed the names of communicate in
+ twoway and oneway invcation classes as remote_oneway and
+ remote_twoway. Seems like the method communicate () in both
+ classes seem to have a problem.
+
+ * tao/IIOP_Connector.cpp: Fixed a unused variable warning.
+
Wed Jul 9 12:43:37 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
* tao/Synch_Invocation.cpp (TAO): Got the semantics of
diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp
index f7077cbfb98..f41fa0529a1 100644
--- a/TAO/tao/IIOP_Connector.cpp
+++ b/TAO/tao/IIOP_Connector.cpp
@@ -277,7 +277,7 @@ TAO_IIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation,
}
TAO_Transport *
-TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *r,
+TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *,
TAO_Transport_Descriptor_Interface &desc,
ACE_Time_Value *max_wait_time)
{
diff --git a/TAO/tao/Invocation_Base.cpp b/TAO/tao/Invocation_Base.cpp
index 4183abe77c4..0f8055274a7 100644
--- a/TAO/tao/Invocation_Base.cpp
+++ b/TAO/tao/Invocation_Base.cpp
@@ -94,9 +94,9 @@ Invocation_Base::Invocation_Base (CORBA::Object *target,
op_details);
status =
- synch.communicate (this->args_,
- this->number_args_
- ACE_ENV_ARG_PARAMETER);
+ synch.remote_oneway (this->args_,
+ this->number_args_
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
else if (this->type_ == TAO_TWOWAY_INVOCATION
@@ -109,12 +109,10 @@ Invocation_Base::Invocation_Base (CORBA::Object *target,
op_details);
status =
- synch.communicate (this->args_,
- this->number_args_
- ACE_ENV_ARG_PARAMETER);
+ synch.remote_twoway (this->args_,
+ this->number_args_
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
-
- cout << "Status is " << (int) status << endl;
}
else if (this->type_ == TAO_TWOWAY_INVOCATION
&& this->mode_ == TAO_ASYNCHRONOUS_CALLBACK_INVOCATION)
diff --git a/TAO/tao/Remote_Invocation.cpp b/TAO/tao/Remote_Invocation.cpp
index b1833440214..984bda6386c 100644
--- a/TAO/tao/Remote_Invocation.cpp
+++ b/TAO/tao/Remote_Invocation.cpp
@@ -22,7 +22,7 @@ namespace TAO
void
Remote_Invocation::init_target_spec (TAO_Target_Specification &target_spec
- ACE_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL)
{
TAO_Profile *pfile =
this->resolver_.profile ();
@@ -106,21 +106,30 @@ namespace TAO
}
}
- void
- Remote_Invocation::send_message (short message_semantics,
- TAO_OutputCDR &out_stream
- ACE_ENV_ARG_DECL)
+ Invocation_Status
+ Remote_Invocation::send_message (TAO_OutputCDR &cdr,
+ short message_semantics
+ ACE_ENV_ARG_DECL_NOT_USED)
{
int retval =
this->resolver_.transport ()->send_request (
this->resolver_.stub (),
this->resolver_.stub ()->orb_core (),
- out_stream,
+ cdr,
message_semantics,
0);
- // Exception handling...
- cout << "Data Sent and the retval is " << retval << endl;
- }
+ if (retval != 0)
+ {
+ if (TAO_debug_level > 2)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("(%P|%t) Synch_Twoway_Invocation::send_message - ")
+ ACE_TEXT ("failure while sending message \n")));
+
+ // Need to close connections..
+ return TAO_INVOKE_RESTART;
+ }
+ return TAO_INVOKE_SUCCESS;
+ }
}
diff --git a/TAO/tao/Remote_Invocation.h b/TAO/tao/Remote_Invocation.h
index a57de7f307c..7285a49abc5 100644
--- a/TAO/tao/Remote_Invocation.h
+++ b/TAO/tao/Remote_Invocation.h
@@ -73,9 +73,9 @@ namespace TAO
TAO_OutputCDR &cdr
ACE_ENV_ARG_DECL);
- void send_message (short message_semantics,
- TAO_OutputCDR &cdr
- ACE_ENV_ARG_DECL);
+ Invocation_Status send_message (TAO_OutputCDR &cdr,
+ short message_semantics
+ ACE_ENV_ARG_DECL);
protected:
Profile_Transport_Resolver &resolver_;
TAO_Operation_Details &detail_;
diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp
index 89f9ea19583..a2c6b49bce4 100644
--- a/TAO/tao/Synch_Invocation.cpp
+++ b/TAO/tao/Synch_Invocation.cpp
@@ -25,9 +25,9 @@ namespace TAO
}
Invocation_Status
- Synch_Twoway_Invocation::communicate (Argument **args,
- int args_number
- ACE_ENV_ARG_DECL)
+ Synch_Twoway_Invocation::remote_twoway (Argument **args,
+ int args_number
+ ACE_ENV_ARG_DECL)
{
TAO_Synch_Reply_Dispatcher rd (this->resolver_.stub ()->orb_core (),
this->detail_.reply_service_info ());
@@ -68,10 +68,14 @@ namespace TAO
ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
- this->send_message (TAO_Transport::TAO_TWOWAY_REQUEST,
- cdr
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
+ Invocation_Status s =
+ this->send_message (cdr,
+ TAO_Transport::TAO_TWOWAY_REQUEST
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (s);
+
+ if (s != TAO_INVOKE_SUCCESS)
+ return s;
// @@ In all MT environments, there's a cancellation point lurking
// here; need to investigate. Client threads would frequently be
@@ -100,6 +104,8 @@ namespace TAO
}
+
+
Invocation_Status
Synch_Twoway_Invocation::check_reply_status (TAO_Synch_Reply_Dispatcher &rd,
Argument **args,
@@ -226,7 +232,7 @@ namespace TAO
#endif
}
- cout << "Got here " << endl;
+
return TAO_INVOKE_SUCCESS;
}
@@ -326,62 +332,53 @@ namespace TAO
{
}
+
+
Invocation_Status
- Synch_Oneway_Invocation::communicate (Argument **args,
- int args_number
- ACE_ENV_ARG_DECL)
+ Synch_Oneway_Invocation::remote_oneway (Argument **args,
+ int args_number
+ ACE_ENV_ARG_DECL)
{
const CORBA::Octet response_flags =
- this->detail_.response_flags ();
+ this->detail_.response_flags ();
- if (response_flags == CORBA::Octet (Messaging::SYNC_NONE)
- || response_flags == CORBA::Octet (Messaging::SYNC_WITH_TRANSPORT)
- || response_flags == CORBA::Octet (TAO::SYNC_EAGER_BUFFERING)
- || response_flags == CORBA::Octet (TAO::SYNC_DELAYED_BUFFERING))
- {
- TAO_Target_Specification tspec;
- this->init_target_spec (tspec ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
+ if (response_flags == CORBA::Octet (Messaging::SYNC_WITH_SERVER) ||
+ response_flags == CORBA::Octet (Messaging::SYNC_WITH_TARGET))
- TAO_OutputCDR &cdr =
- this->resolver_.transport ()->messaging_object ()->out_stream ();
+ return Synch_Twoway_Invocation::remote_twoway (args,
+ args_number
+ ACE_ENV_ARG_PARAMETER);
- this->write_header (tspec,
- cdr
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
- this->marshal_data (args,
- args_number,
- cdr
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
+ TAO_Target_Specification tspec;
+ this->init_target_spec (tspec ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
+ TAO_OutputCDR &cdr =
+ this->resolver_.transport ()->messaging_object ()->out_stream ();
- if (response_flags != CORBA::Octet (Messaging::SYNC_WITH_TRANSPORT))
- {
- this->send_message (TAO_Transport::TAO_ONEWAY_REQUEST,
- cdr
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
- }
- else
- {
- this->send_message (TAO_Transport::TAO_TWOWAY_REQUEST,
- cdr
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
- }
- }
- else
+ this->write_header (tspec,
+ cdr
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
+
+ this->marshal_data (args,
+ args_number,
+ cdr
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
+
+
+ if (response_flags == CORBA::Octet (Messaging::SYNC_WITH_TRANSPORT))
{
- return Synch_Twoway_Invocation::communicate (args,
- args_number
- ACE_ENV_ARG_PARAMETER);
+ return this->send_message (cdr,
+ TAO_Transport::TAO_TWOWAY_REQUEST
+ ACE_ENV_ARG_PARAMETER);
}
- return TAO_INVOKE_SUCCESS;
+ return this->send_message (cdr,
+ TAO_Transport::TAO_ONEWAY_REQUEST
+ ACE_ENV_ARG_PARAMETER);
}
-
}
diff --git a/TAO/tao/Synch_Invocation.h b/TAO/tao/Synch_Invocation.h
index 714ec2c6395..bef1ae3bd5f 100644
--- a/TAO/tao/Synch_Invocation.h
+++ b/TAO/tao/Synch_Invocation.h
@@ -42,9 +42,9 @@ namespace TAO
Synch_Twoway_Invocation (Profile_Transport_Resolver &resolver,
TAO_Operation_Details &detail);
- Invocation_Status communicate (Argument **args,
- int args_number
- ACE_ENV_ARG_DECL);
+ Invocation_Status remote_twoway (Argument **args,
+ int args_number
+ ACE_ENV_ARG_DECL);
protected:
@@ -55,6 +55,7 @@ namespace TAO
Invocation_Status handle_user_exception (TAO_InputCDR &cdr
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
+
private:
Invocation_Status check_reply_status (TAO_Synch_Reply_Dispatcher &rd,
@@ -71,10 +72,9 @@ namespace TAO
Synch_Oneway_Invocation (Profile_Transport_Resolver &resolver,
TAO_Operation_Details &detail);
- Invocation_Status communicate (Argument **args,
- int args_number
- ACE_ENV_ARG_DECL);
-
+ Invocation_Status remote_oneway (Argument **args,
+ int args_number
+ ACE_ENV_ARG_DECL);
};
}