summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-05-27 22:21:14 +0000
committerjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-05-27 22:21:14 +0000
commitaa1611c1c4f0d8a669f070727afcff94bc1a9a29 (patch)
tree798238d6cf351dd5fafe25c254d3b88872e0b109
parent23506b3d4afaf7d774eddb11eb6c5b7ebddfe2ab (diff)
downloadATCD-aa1611c1c4f0d8a669f070727afcff94bc1a9a29.tar.gz
ChangeLogTag: Fri May 27 15:19:57 2005 J.T. Conklin <jtc@acorntoolworks.com>
-rw-r--r--TAO/ChangeLog20
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_i.cpp97
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_i.h4
3 files changed, 85 insertions, 36 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 763eb41ee5f..8a6efdc5eef 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,15 @@
+Fri May 27 15:19:57 2005 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * orbsvcs/orbsvcs/Log/Log_i.cpp:
+ * orbsvcs/orbsvcs/Log/Log_i.h:
+
+ Changed class to store a single QoS property instead of list, as
+ the currently specified properties are mutually exclusive. This
+ greatly simplifies the get_log_qos and set_log_qos methods.
+
+ Changed set_log_qos to return all of the unknown/unsupported QoS
+ properties when throwing the UnsupportedQoS exception.
+
Fri May 27 17:01:24 2005 Chris Cleeland <cleeland_c@ociweb.com>
* orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp:
@@ -14,7 +26,7 @@ Fri May 27 17:01:24 2005 Chris Cleeland <cleeland_c@ociweb.com>
than its hostname. However, all the IORs distributed by the
client would use the hostname, and, thus, the server would not
be able to find a match for the client's endpoint in its cache,
- and subsequently try to create a new one.
+ and subsequently try to create a new one.
The change now creates an entry in the cache using, for the
hostname portion of the key, the host name however the client
@@ -28,7 +40,7 @@ Fri May 27 17:01:24 2005 Chris Cleeland <cleeland_c@ociweb.com>
* orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp:
* tao/IIOP_Connection_Handler.cpp (process_listen_point_list):
-
+
When creating an IIOP Endpoint, passed in the value of the
ORBDottedDecimal address value from the ORB_Core. This is a real
stupid mistake :(. Added a debug statement. Thanks to Werner
@@ -66,11 +78,11 @@ Fri May 27 17:01:24 2005 Chris Cleeland <cleeland_c@ociweb.com>
expected results, and indicates whether each permutation
succeeds or fails. It also depends upon a new option to catior,
found in the next entry.
-
+
* orbsvcs/tests/Security/BiDirectional/server.conf:
Removed some hardcoded paths to OCI personal home directories.
-
+
* utils/catior/catior.cpp:
Added a "-x" option that works like "-f" except that it reads
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp b/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp
index 3d543b2e0cb..44336e3f720 100644
--- a/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp
@@ -41,7 +41,7 @@ TAO_Log_i::TAO_Log_i (CORBA::ORB_ptr orb,
this->current_threshold_ = 0;
this->thresholds_.length(1);
this->thresholds_[0] = 100;
-
+ this->qostype_ = DsLogAdmin::QoSNone;
}
void
@@ -79,13 +79,24 @@ DsLogAdmin::QoSList*
TAO_Log_i::get_log_qos (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- DsLogAdmin::QoSList* ret_val;
+ // @@ The current revision of the specification (formal/03-07-01)
+ // states that get_log_qos() returns a list of the QoS properties
+ // supported by the log, not the current value. However, because
+ // that is inconsistent with both the Log Service's other get
+ // methods and the Notification Service's QoS get_qos methods, I
+ // have submitted a defect report to the OMG for clarification.
+ // --jtc
+
+ DsLogAdmin::QoSList_var ret_val;
ACE_NEW_THROW_EX (ret_val,
- DsLogAdmin::QoSList (this->qoslist_),
+ DsLogAdmin::QoSList (1),
CORBA::NO_MEMORY ());
ACE_CHECK_RETURN (0);
- return ret_val;
+ ret_val->length(1);
+ ret_val[0] = qostype_;
+
+ return ret_val._retn ();
}
void
@@ -94,46 +105,72 @@ TAO_Log_i::set_log_qos (const DsLogAdmin::QoSList &qos
ACE_THROW_SPEC ((CORBA::SystemException,
DsLogAdmin::UnsupportedQoS))
{
- // validate supported properties..
-
- // implement after persistence is added.
- DsLogAdmin::QoSList_var old_qos;
- old_qos = get_log_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Boolean change = false;
-
-
+ // @@ The current revision of the specification (formal/03-07-01)
+ // does not clearly define the semantics to follow when the QoSList
+ // contains mutually exclusive, unsupported, or unknown properties.
+ // I have submitted a defect report to the OMG for clarification.
+ //
+ // In the mean time, the last known/supported property found in the
+ // QoSList takes presidence. If any unknown/unsupported properties
+ // were found, an UnsupportedQoS exception is thrown.
+ // --jtc
+
+ DsLogAdmin::QoSType old_qos = this->qostype_;
+ DsLogAdmin::QoSType qostype = old_qos;
+ DsLogAdmin::QoSList denied;
+
+ // validate properties..
for (CORBA::ULong i = 0; i < qos.length (); ++i)
{
- DsLogAdmin::QoSType qostype = qos[i];
- if (qostype == DsLogAdmin::QoSFlush ||
- qostype == DsLogAdmin::QoSReliability)
+ qostype = qos[i];
+ if (qostype != DsLogAdmin::QoSNone &&
+ qostype != DsLogAdmin::QoSFlush &&
+ qostype != DsLogAdmin::QoSReliability)
{
- DsLogAdmin::QoSList denied;
- denied._allocate_buffer (2);
- denied.length (0);
-
- denied[0] = DsLogAdmin::QoSFlush;
- denied[1] = DsLogAdmin::QoSReliability;
-
- ACE_THROW (DsLogAdmin::UnsupportedQoS (denied));
+ CORBA::ULong len = denied.length();
+ denied.length(len + 1);
+ denied[len] = qostype;
}
}
- // store this list.
- this->qoslist_ = qos;
+ // if there were any unknown/unsupported properties, thrown an
+ // exception.
+ if (denied.length() != 0)
+ {
+ ACE_THROW (DsLogAdmin::UnsupportedQoS (denied));
+ }
+
+ if (qostype == old_qos)
+ return;
+
+ this->qostype_ = qostype;
- if (notifier_ && change)
+ if (notifier_)
{
DsLogAdmin::Log_var log =
this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
+ DsLogAdmin::QoSList_var old_qoslist;
+ ACE_NEW_THROW_EX (old_qoslist,
+ DsLogAdmin::QoSList (1),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK;
+ old_qoslist->length(1);
+ old_qoslist[0] = old_qos;
+
+ DsLogAdmin::QoSList_var new_qoslist;
+ ACE_NEW_THROW_EX (new_qoslist,
+ DsLogAdmin::QoSList (1),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK;
+ new_qoslist->length(1);
+ new_qoslist[0] = qostype;
+
notifier_->quality_of_service_value_change (log.in (),
logid_,
- old_qos.in (),
- qos
+ old_qoslist.in (),
+ new_qoslist.in ()
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_i.h b/TAO/orbsvcs/orbsvcs/Log/Log_i.h
index 175a4f4abd4..9ec604f823b 100644
--- a/TAO/orbsvcs/orbsvcs/Log/Log_i.h
+++ b/TAO/orbsvcs/orbsvcs/Log/Log_i.h
@@ -400,8 +400,8 @@ protected:
/// A Sequence of the weekly intervals when the log is in operation.
TAO_Unbounded_Sequence<DsLogAdmin::TimeInterval> weekly_intervals_;
- /// The QoS list of the log
- DsLogAdmin::QoSList qoslist_;
+ /// The QoS type of the log
+ DsLogAdmin::QoSType qostype_;
/// The reactor used for timing (startup and shutdown), etc
ACE_Reactor *reactor_;