summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2013-06-06 12:11:21 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2013-06-06 12:11:21 +0000
commita5c50f0b89fd20684207de249b148cb865629562 (patch)
treec10dc9bf0baa6f915cd24f95ba876a8d7b1629e6
parent00dd17df6807e223cd38ef90758173ec260a5a58 (diff)
downloadATCD-a5c50f0b89fd20684207de249b148cb865629562.tar.gz
Thu Jun 6 12:10:48 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
* orbsvcs/orbsvcs/Trader/Offer_Database.cpp: Fixed Coverity warning * orbsvcs/orbsvcs/Trader/Trading_Loader.h: Fixed Coverity warning and doxygen changes
-rw-r--r--TAO/ChangeLog8
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp3
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.h52
3 files changed, 33 insertions, 30 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 12564d4769d..c28c4b64bb0 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,11 @@
+Thu Jun 6 12:10:48 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * orbsvcs/orbsvcs/Trader/Offer_Database.cpp:
+ Fixed Coverity warning
+
+ * orbsvcs/orbsvcs/Trader/Trading_Loader.h:
+ Fixed Coverity warning and doxygen changes
+
Wed Jun 5 20:11:23 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
* examples/AMI/FL_Callback/progress.cpp:
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp
index be521123e22..d964707da75 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp
@@ -224,6 +224,8 @@ lookup_offer (const char* type, CORBA::ULong id)
template <class LOCK_TYPE> TAO_Offer_Id_Iterator*
TAO_Offer_Database<LOCK_TYPE>::retrieve_all_offer_ids (void)
{
+ ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, this->db_lock_, 0);
+
// Fill an TAO_Offer_Id_Iterator with the offer_ids of all offers
// exported to the TAO_Offer_Database. Iterates through the entire
// map, cramming offer_id strings into a newly constructed
@@ -232,7 +234,6 @@ TAO_Offer_Database<LOCK_TYPE>::retrieve_all_offer_ids (void)
ACE_NEW_RETURN (id_iterator,
TAO_Offer_Id_Iterator (),
0);
- ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, this->db_lock_, 0);
for (typename Offer_Database::iterator type_iter (this->offer_db_);
! type_iter.done ();
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.h b/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.h
index 53f1082de0e..aab21dbcb97 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.h
+++ b/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.h
@@ -34,79 +34,73 @@
class TAO_Trading_Serv_Export TAO_Trading_Loader : public TAO_Object_Loader
{
public:
-
+ /// Constructor
TAO_Trading_Loader (void);
- // Constructor
+ /// Destructor
~TAO_Trading_Loader (void);
- // Destructor
+ /// Called by the Service Configurator framework to initialize the
+ /// Event Service. Defined in <ace/Service_Config.h>
virtual int init (int argc, ACE_TCHAR *argv[]);
- // Called by the Service Configurator framework to initialize the
- // Event Service. Defined in <ace/Service_Config.h>
+ /// Called by the Service Configurator framework to remove the
+ /// Event Service. Defined in <ace/Service_Config.h>
virtual int fini (void);
- // Called by the Service Configurator framework to remove the
- // Event Service. Defined in <ace/Service_Config.h>
+ /// Run the Trading Service
int run (void);
- // Run the Trading Service
+ /// This function call initializes the Trading Service given a reference to the
+ /// ORB and the command line parameters.
CORBA::Object_ptr create_object (CORBA::ORB_ptr orb,
int argc,
ACE_TCHAR *argv[]);
- // This function call initializes the Trading Service given a reference to the
- // ORB and the command line parameters.
protected:
+ /// Enable the Trading Service to answer multicast requests for its
+ /// IOR.
int init_multicast_server (void);
- // Enable the Trading Service to answer multicast requests for its
- // IOR.
+ /// Bootstrap to another trader, and attach to its trader network.
int bootstrap_to_federation (void);
- // Bootstrap to another trader, and attach to its trader network.
+ /// Parses the command line arguments
int parse_args (int &argc, ACE_TCHAR *argv []);
- // Parses the command line arguments
+ /// The ORB manager.
TAO_ORB_Manager orb_manager_;
- // The ORB manager.
+ /// Pointer to the linked trader.
auto_ptr<TAO_Trader_Factory::TAO_TRADER> trader_;
- // Pointer to the linked trader.
+ /// Service Type Repository used by the trading service.
TAO_Service_Type_Repository type_repos_;
- // Service Type Repository used by the trading service.
+ /// IOR of the trader kept around for handiness purposes.
CORBA::String_var ior_;
- // IOR of the trader kept around for handiness purposes.
+ /// Flag indicating whether this trader should join the federation.
CORBA::Boolean federate_;
- // Flag indicating whether this trader should join the federation.
+ /// File to output the Naming Service IOR.
FILE *ior_output_file_;
- // File to output the Naming Service IOR.
+ /// Name of this trading service: "hostname:pid".
CORBA::String_var name_;
- // Name of this trading service: "hostname:pid".
+ /// Event handler that responds to resolve_initial_references
+ /// requests.
TAO_IOR_Multicast ior_multicast_;
- // Event handler that responds to resolve_initial_references
- // requests.
+ /// Flag inidicating whether we're the trader others are bootstrapping to.
CORBA::Boolean bootstrapper_;
- // Flag inidicating whether we're the trader others are bootstrapping to.
-
- CORBA::Boolean dumpior_;
- // Flag indication whether to dump the ior to standard output
private:
-
// Disallow copying and assignment.
TAO_Trading_Loader (const TAO_Trading_Loader &);
TAO_Trading_Loader &operator= (const TAO_Trading_Loader &);
-
};
ACE_FACTORY_DECLARE (TAO_Trading_Serv, TAO_Trading_Loader)