summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2006-11-30 12:45:42 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2006-11-30 12:45:42 +0000
commitf67e31a22d12c687747e6f765339abb22aaf9ea9 (patch)
tree22697a849a55975917abe374ddb6e7c2557330b7
parentd0bbbb94d4a609631894af852725ea92686b4c99 (diff)
downloadATCD-f67e31a22d12c687747e6f765339abb22aaf9ea9.tar.gz
Thu Nov 30 12:45:12 2006 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--CIAO/ChangeLog41
-rw-r--r--CIAO/DAnCE/ExecutionManager/Execution_Manager.cpp3
-rw-r--r--CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp2
-rw-r--r--CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.h2
-rw-r--r--CIAO/DAnCE/RepositoryManager/RepositoryManager.cpp15
-rw-r--r--CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.h33
-rw-r--r--CIAO/DAnCE/RepositoryManager/ZIP_Wrapper.cpp254
-rw-r--r--CIAO/DAnCE/RepositoryManager/ZIP_Wrapper.h35
-rw-r--r--CIAO/DAnCE/TargetManager/CmpClient.cpp18
-rw-r--r--CIAO/DAnCE/TargetManager/Deployment_Configuration.cpp6
-rw-r--r--CIAO/DAnCE/TargetManager/DomainDataManager.h37
-rw-r--r--CIAO/DAnCE/TargetManager/DomainEvents.idl1
-rw-r--r--CIAO/DAnCE/TargetManager/TM_Client.mpc3
-rw-r--r--CIAO/DAnCE/TargetManager/TargetManager_exec.cpp7
14 files changed, 230 insertions, 227 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index 799a6214ab1..07659b74bd8 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,44 @@
+Thu Nov 30 12:45:12 2006 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/ExecutionManager/Execution_Manager.cpp:
+ Removed not needed ACE_TRY_CHECK
+
+ * DAnCE/ExecutionManager/Execution_Manager_Impl.cpp:
+ * DAnCE/ExecutionManager/Execution_Manager_Impl.h:
+ Const improvement
+
+ * DAnCE/RepositoryManager/RepositoryManager.cpp:
+ Initialise pointer with 0, removed code after return
+ added added a todo
+
+ * DAnCE/RepositoryManager/RepositoryManager_Impl.h:
+ Doxygen improvement
+
+ * DAnCE/RepositoryManager/ZIP_Wrapper.cpp:
+ Lot of layout changes to make the code a little bit more
+ readable, more has to be done to this file
+
+ * DAnCE/RepositoryManager/ZIP_Wrapper.h:
+ Doyxgen improvements and removed not needed include
+
+ * DAnCE/TargetManager/CmpClient.cpp:
+ Use true/false for a bool
+
+ * DAnCE/TargetManager/Deployment_Configuration.cpp:
+ Use bool and use 0 instead of NULL
+
+ * DAnCE/TargetManager/DomainDataManager.h:
+ Doxygen changes
+
+ * DAnCE/TargetManager/DomainEvents.idl:
+ Removed not needed include
+
+ * DAnCE/TargetManager/TargetManager_exec.cpp:
+ Layout changes
+
+ * DAnCE/TargetManager/TM_Client.mpc:
+ Removed not needed includes
+
Wed Nov 29 21:26:53 UTC 2006 Jeff Parsons <j.parsons@vanderbilt.edu>
* docs/generate_component_mpc.html:
diff --git a/CIAO/DAnCE/ExecutionManager/Execution_Manager.cpp b/CIAO/DAnCE/ExecutionManager/Execution_Manager.cpp
index 545da80c14b..bb007479f31 100644
--- a/CIAO/DAnCE/ExecutionManager/Execution_Manager.cpp
+++ b/CIAO/DAnCE/ExecutionManager/Execution_Manager.cpp
@@ -189,9 +189,6 @@ namespace CIAO
daemon_servant->_this ();
TAO::Utils::Implicit_Deactivator de (daemon_servant);
-
- ACE_TRY_CHECK;
-
bool retval = false;
if (register_with_ns_)
diff --git a/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp b/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp
index cef9bce35b9..85f7ebd005d 100644
--- a/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp
+++ b/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp
@@ -218,7 +218,7 @@ namespace CIAO
Deployment::DeploymentPlan_var plan = dam->getPlan ();
// If any component is still running, then we return.
- CORBA::ULong inst_lenth = plan->instance.length ();
+ CORBA::ULong const inst_lenth = plan->instance.length ();
for (CORBA::ULong i = 0; i < inst_lenth; ++i)
{
if (this->is_component_running (plan->instance[i].name.in (),
diff --git a/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.h b/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.h
index 174fc793c99..cbbdd3094a1 100644
--- a/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.h
+++ b/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.h
@@ -166,7 +166,7 @@ namespace CIAO
PortableServer::POA_var poa_;
/// Path to the initialization file
- const ACE_CString init_file_;
+ ACE_CString const init_file_;
/// A map which caches the DomainApplicationManager object ref.
DAM_Map map_;
diff --git a/CIAO/DAnCE/RepositoryManager/RepositoryManager.cpp b/CIAO/DAnCE/RepositoryManager/RepositoryManager.cpp
index cb99ca7f3f1..46a5c009e57 100644
--- a/CIAO/DAnCE/RepositoryManager/RepositoryManager.cpp
+++ b/CIAO/DAnCE/RepositoryManager/RepositoryManager.cpp
@@ -154,7 +154,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
mgr->activate ();
//create a servant
- CIAO_RepositoryManagerDaemon_i* repo;
+ CIAO_RepositoryManagerDaemon_i* repo = 0;
ACE_NEW_RETURN (repo,
CIAO_RepositoryManagerDaemon_i (
orb.in (),
@@ -202,19 +202,10 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- //done
+ // done
return 0;
- //Start accepting requests
- orb->run ();
-
- //allow objects registered with the POA ot get cleaned-up
- root_poa->destroy (1, 1);
-
- //shutdown the orb
- orb->shutdown (1);
-
- return 0;
+ // todo shutdown orb
}
catch (CORBA::Exception &ex) {
cerr << "CORBA Exception: " << ex << endl;
diff --git a/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.h b/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.h
index b35dd6a94f6..5de7e3268d2 100644
--- a/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.h
+++ b/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.h
@@ -177,11 +177,11 @@ protected:
ACE_CString& pcd_name);
- ///function to remove the files extracted for parsing the PackageConfiguration
- ///descriptor and populating the idl struct. It reads the names of the files
- ///from the package. They correspond to the names on disk.
- ///return 1 on success
- /// 0 on error
+ /// Function to remove the files extracted for parsing the PackageConfiguration
+ /// descriptor and populating the idl struct. It reads the names of the files
+ /// from the package. They correspond to the names on disk.
+ /// @retval 1 on success
+ /// @retval 0 on error
int remove_descriptor_files (char* package);
@@ -255,25 +255,32 @@ private:
typedef CIEntry::VALUE_SET CISet;
typedef CIEntry::VALUE_SET_ITERATOR CISet_Iterator;
- //a hash map that associates the names of
- //PackageConfigurations with their location
+ /// A hash map that associates the names of
+ /// PackageConfigurations with their location
PCMap names_;
/// a hash map that associates the UUIDs of
/// PackageConfigurations with their location
PCMap uuids_;
- //a hash map which associates Component Interface
- //UUIDs with their implementations
+ /// a hash map which associates Component Interface
+ /// UUIDs with their implementations
CIMap types_;
//the ORB
CORBA::ORB_var the_orb_;
- char cwd_ [TEMP_LEN]; //will hold the current working directory
- ACE_CString install_root_; //full path for the install directory
- ACE_CString HTTP_server_; //location of the server
- ACE_CString install_path; //directory where the packages will be stored locally
+ //will hold the current working directory
+ char cwd_ [TEMP_LEN];
+
+ //full path for the install directory
+ ACE_CString install_root_;
+
+ //location of the server
+ ACE_CString HTTP_server_;
+
+ //directory where the packages will be stored locally
+ ACE_CString install_path;
};
#endif /* REPOSITORYMANAGER_H_ */
diff --git a/CIAO/DAnCE/RepositoryManager/ZIP_Wrapper.cpp b/CIAO/DAnCE/RepositoryManager/ZIP_Wrapper.cpp
index d5148bd178a..b318af0ad13 100644
--- a/CIAO/DAnCE/RepositoryManager/ZIP_Wrapper.cpp
+++ b/CIAO/DAnCE/RepositoryManager/ZIP_Wrapper.cpp
@@ -8,7 +8,7 @@
* Purpose: implementing the ZIP_Wrapper class
*
* @author Stoyan Paunov, Vipul Singh
- *
+ *
*/
//===============================================================================
@@ -23,7 +23,6 @@
#include "ace/OS_Memory.h" //for ACE_NEW* macros
#include <string>
-#include <memory> //for auto_ptr
#include "unzip.h"
#define MAXFILENAME (256)
#define CASESENSITIVITY (0)
@@ -48,15 +47,15 @@ ZIP_File_Info::ZIP_File_Info ()
prev_ (0)
{
}
-
+
/// Gets a list of the files in the archive.
int ZIP_Wrapper::file_list_info (char* zip_name,
ACE_Double_Linked_List<ZIP_File_Info> &list)
{
- unzFile uf=NULL;
+ unzFile uf=0;
char filename_try[MAXFILENAME+16] = "";
- if (zip_name!=NULL)
+ if (zip_name!=0)
{
strncpy(filename_try, zip_name, MAXFILENAME-1);
/* strncpy doesnt append the trailing NULL, if the string is too long. */
@@ -64,14 +63,14 @@ int ZIP_Wrapper::file_list_info (char* zip_name,
/* open the zip file */
uf = unzOpen(zip_name);
/* if zipfile could not be opened, try appending .zip to name */
- if (uf==NULL)
- {
- strcat(filename_try, ".zip");
- uf = unzOpen(filename_try);
- }
+ if (uf==0)
+ {
+ ACE_OS::strcat(filename_try, ".zip");
+ uf = unzOpen(filename_try);
+ }
}
- /* If zipfile could not be opened still, return */
- if (uf==NULL)
+ /* If zipfile could not be opened still, return */
+ if (uf==0)
{
ACE_DEBUG((LM_DEBUG, ACE_TEXT("There is some problem in opening"
" %s or %s.zip using unzOpen \n"), zip_name, zip_name));
@@ -91,19 +90,19 @@ int ZIP_Wrapper::file_list_info (char* zip_name,
unz_file_info file_info;
/* get information about the current file in zip file */
err = unzGetCurrentFileInfo(uf, &file_info, filename_inzip,
- sizeof(filename_inzip), NULL, 0, NULL, 0);
+ sizeof(filename_inzip), 0, 0, 0, 0);
if (err!=UNZ_OK)
- {
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("unzGetCurrentFileInfo failed"
- " while trying to get information"
- " about current file\n"), err));
- break;
- }
- ZIP_File_Info* next;
- ACE_NEW_RETURN (next, ZIP_File_Info (filename_inzip,
+ {
+ ACE_DEBUG((LM_DEBUG, ACE_TEXT("unzGetCurrentFileInfo failed"
+ " while trying to get information"
+ " about current file\n"), err));
+ break;
+ }
+ ZIP_File_Info* next = 0;
+ ACE_NEW_RETURN (next, ZIP_File_Info (filename_inzip,
sizeof(filename_inzip)), -1);
/* add information about current file to the list */
- list.insert_tail (next);
+ list.insert_tail (next);
if ((i+1)<gi.number_entry)
{
err = unzGoToNextFile(uf);
@@ -125,66 +124,66 @@ bool ZIP_Wrapper::get_file (char* archive_path, char* filename,
ACE_Message_Block &file)
{
bool return_code = true;
- unzFile uf=NULL;
+ unzFile uf=0;
uf = unzOpen(archive_path);
/* locate the desired file in the zip file and set it as current file*/
int j=unzLocateFile(uf, filename, 0);
- if (j==UNZ_END_OF_LIST_OF_FILE)
+ if (j==UNZ_END_OF_LIST_OF_FILE)
{
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("File not found in zip archive")));
+ ACE_DEBUG((LM_DEBUG, ACE_TEXT("File not found in zip archive")));
return false;
}
else if (j==UNZ_OK)
{
int k=unzOpenCurrentFile(uf);
if (k!=UNZ_OK)
- {
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("Error in opening the current"
- " file using unzOpenCurrentFile")));
- return false;
- }
+ {
+ ACE_DEBUG((LM_DEBUG, ACE_TEXT("Error in opening the current"
+ " file using unzOpenCurrentFile")));
+ return false;
+ }
else
- {
- int num_read = 0;
- ACE_Message_Block* head = &file;
+ {
+ int num_read = 0;
+ ACE_Message_Block* head = &file;
- //read the file into the ACE_Message_Block
- do
- {
- if (head->space () == 0)
- {
- ACE_Message_Block* next;
- ACE_NEW_RETURN (next, ACE_Message_Block (BUFSIZ), false);
- head->cont ();
- head = head->cont ();
- }
- num_read = unzReadCurrentFile(archive_path, head->wr_ptr(),
- head->space());
- if (num_read > 0)
- head->wr_ptr (num_read);
- } while (num_read > 0);
- if (num_read < 0)
- return_code = false;
- unzCloseCurrentFile(uf);
- unzClose(uf);
- return return_code;
- }
+ //read the file into the ACE_Message_Block
+ do
+ {
+ if (head->space () == 0)
+ {
+ ACE_Message_Block* next = 0;
+ ACE_NEW_RETURN (next, ACE_Message_Block (BUFSIZ), false);
+ head->cont ();
+ head = head->cont ();
+ }
+ num_read = unzReadCurrentFile(archive_path, head->wr_ptr(),
+ head->space());
+ if (num_read > 0)
+ head->wr_ptr (num_read);
+ } while (num_read > 0);
+ if (num_read < 0)
+ return_code = false;
+ unzCloseCurrentFile(uf);
+ unzClose(uf);
+ return return_code;
+ }
}
return return_code;
}
/// uncompress the zip file
-/// The zip file will be uncompressed into a directory
+/// The zip file will be uncompressed into a directory
/// with the name of zip archive.
/// the path is assumed to be an existing directory
bool ZIP_Wrapper::uncompress (char* zip_archive, char* path, bool verbose)
{
//open the zip archive
- unzFile uf=NULL;
+ unzFile uf=0;
uf = unzOpen(zip_archive);
- if (uf==NULL)
+ if (uf==0)
{
ACE_DEBUG((LM_DEBUG,ACE_TEXT("unzOpen failed to open the"
" zipfile\n")));
@@ -196,7 +195,7 @@ bool ZIP_Wrapper::uncompress (char* zip_archive, char* path, bool verbose)
//get only the name of the archive; remove path info
char* n = ACE_OS::strstr (zip_archive, "/");
char* zip_name = 0;
- while (n != NULL)
+ while (n != 0)
{
zip_name = ++n;
n = ACE_OS::strstr (n, "/");
@@ -205,7 +204,7 @@ bool ZIP_Wrapper::uncompress (char* zip_archive, char* path, bool verbose)
//NOTE: Assumes .zip or cpk extension
arch_dir = arch_dir.substring (0, arch_dir.length () - 4);
//create directory with the name of zip archive
- ACE_OS::mkdir(arch_dir.c_str());
+ ACE_OS::mkdir(arch_dir.c_str());
//if dir exists -1 is returned and ignored
unz_global_info gi;
int err = unzGetGlobalInfo(uf, &gi);
@@ -217,7 +216,7 @@ bool ZIP_Wrapper::uncompress (char* zip_archive, char* path, bool verbose)
}
err =unzGoToFirstFile(uf);
if (err!=UNZ_OK)
- {
+ {
ACE_DEBUG((LM_DEBUG,ACE_TEXT("error %d with zipfile in"
" unzGoToFirstFile \n"), err));
return false;
@@ -226,43 +225,43 @@ bool ZIP_Wrapper::uncompress (char* zip_archive, char* path, bool verbose)
a non existing directory whereas if it is a file, write the file
at the proper path in the directory structure */
for (uLong i=0;i<gi.number_entry;i++)
- {
+ {
char filename_inzip[256];
unz_file_info file_info;
err = unzGetCurrentFileInfo(uf, &file_info, filename_inzip,
- sizeof(filename_inzip), NULL, 0, NULL, 0);
+ sizeof(filename_inzip), 0, 0, 0, 0);
if (err!=UNZ_OK)
- {
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("unzGetCurrentFileInfo failed"
- " while trying to get information"
- " about currentfile\n"), err));
- break;
- }
- int direc=checkdir(filename_inzip);
+ {
+ ACE_DEBUG((LM_DEBUG, ACE_TEXT("unzGetCurrentFileInfo failed"
+ " while trying to get information"
+ " about currentfile\n"), err));
+ break;
+ }
+ int direc = checkdir(filename_inzip);
/* If it is a directory, we create directory structure */
if (direc==1)
- {
- makethedir(filename_inzip, arch_dir);
- }
- /* If it is a file, we read its data and write the uncompressed
+ {
+ makethedir(filename_inzip, arch_dir);
+ }
+ /* If it is a file, we read its data and write the uncompressed
data to the file with proper path.*/
else if (direc==0)
- {
- handlethefile(filename_inzip, uf, file_info, verbose, arch_dir);
- }
+ {
+ handlethefile(filename_inzip, uf, file_info, verbose, arch_dir);
+ }
if ((i+1)<gi.number_entry)
- {
- err = unzGoToNextFile(uf);
- if (err!=UNZ_OK)
- {
- ACE_DEBUG((LM_DEBUG,ACE_TEXT("unzGoToNextFile failed"
- " while trying to go to"
- " nextfile\n"), err));
- break;
- }
- }
+ {
+ err = unzGoToNextFile(uf);
+ if (err!=UNZ_OK)
+ {
+ ACE_ERROR((LM_ERROR,ACE_TEXT("unzGoToNextFile failed"
+ " while trying to go to"
+ " nextfile\n"), err));
+ break;
+ }
+ }
}
- unzClose(uf);
+ unzClose(uf);
return true;
}
@@ -271,21 +270,21 @@ bool ZIP_Wrapper::uncompress (char* zip_archive, char* path, bool verbose)
///try to find if it is a directory OR file
int ZIP_Wrapper::checkdir (char* filename_inzip)
{
- int direc=0;
+ int direc = 0;
char* dircheck = ACE_OS::strstr (filename_inzip, "/");
- /* We assume that a directory will have its entry terminating in a /
+ /* We assume that a directory will have its entry terminating in a /
We also assume that the directory entries in the zip file use
forward slash for both unix and windows */
- while (dircheck != NULL)
- {
- int i=ACE_OS::strcmp(dircheck, "/");
- if (i==0)
- {
- direc=1;
- break;
- }
- dircheck++;
- dircheck = ACE_OS::strstr (dircheck, "/");
+ while (dircheck != 0)
+ {
+ int i = ACE_OS::strcmp(dircheck, "/");
+ if (i == 0)
+ {
+ direc = 1;
+ break;
+ }
+ ++dircheck;
+ dircheck = ACE_OS::strstr (dircheck, "/");
}
return direc;
}
@@ -296,18 +295,18 @@ int ZIP_Wrapper::makethedir (char* filename_inzip, ACE_CString arch_dir)
//let's try to create the directory structure for the package
char dir_name [2048];
char* next = ACE_OS::strstr (filename_inzip, "/");
- while (next != NULL)
+ while (next != 0)
{
ACE_CString location (arch_dir);
ACE_OS::strncpy (dir_name, filename_inzip, next - filename_inzip
+ 1);
-
+
dir_name[next - filename_inzip + 1] = '\0';
location += "/";
location += dir_name;
ACE_stat stat;
if (ACE_OS::stat (location.c_str (), &stat) == -1)
- ACE_OS::mkdir (location.c_str ());
+ ACE_OS::mkdir (location.c_str ());
next++;
next = ACE_OS::strstr (next, "/");
}
@@ -320,56 +319,57 @@ int ZIP_Wrapper::handlethefile (char* filename_inzip, unzFile uf,
unz_file_info file_info, bool verbose,
ACE_CString arch_dir)
{
- int k =unzOpenCurrentFile(uf);
+ int k = unzOpenCurrentFile(uf);
if (k!=UNZ_OK)
{
- ACE_DEBUG((LM_DEBUG,ACE_TEXT("unzOpenCurrentFile failed in"
+ ACE_ERROR((LM_ERROR,ACE_TEXT("unzOpenCurrentFile failed in"
" opening the current file")));
return false;
}
else
- {
- size_t file_size = file_info.uncompressed_size;
+ {
+ size_t const file_size = file_info.uncompressed_size;
char* temp = 0;
ACE_NEW_RETURN (temp, char [file_size], false);
- ACE_Auto_Basic_Array_Ptr<char> buffer (temp);
+ ACE_Auto_Basic_Array_Ptr<char> buffer (temp);
//read in the data
unzReadCurrentFile(uf, &(*buffer), file_size);
//close the zip handle
- unzCloseCurrentFile(uf);
+ unzCloseCurrentFile(uf);
//create file name + path to open
- std::string file_path (arch_dir.c_str ());
+ std::string file_path (arch_dir.c_str ());
//NOTE: need the c-style char to stop at '\0'
file_path += "/";
file_path += filename_inzip;
//print out the file to be uncompressed
if (verbose)
- {
- ACE_OS::write(ACE_STDOUT, file_path.c_str (),
- file_path.length () );
- ACE_OS::write(ACE_STDOUT, "\n", 1);
- }
+ {
+ ACE_OS::write(ACE_STDOUT, file_path.c_str (),
+ file_path.length () );
+ ACE_OS::write(ACE_STDOUT, "\n", 1);
+ }
// Open a file handle to the local filesystem
ACE_HANDLE handle = ACE_OS::open (file_path.c_str (),
O_CREAT | O_TRUNC | O_WRONLY);
if (handle == ACE_INVALID_HANDLE)
- {
- unzClose(uf);
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
+ {
+ unzClose(uf);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
ACE_TEXT ("[uncompress] file creation error")),
0);
- }
- //write the uncompressed data to the file
+ }
+ //write the uncompressed data to the file
if (ACE_OS::write (handle, &(*buffer), file_size) == -1)
- {
- unzClose(uf);
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("[uncompress] file write error")),
- 0);
- }
+ {
+ unzClose(uf);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("[uncompress] file write error")),
+ 0);
+ }
// Close the file handle
- ACE_OS::close (handle);
+ ACE_OS::close (handle);
}
return 0;
}
diff --git a/CIAO/DAnCE/RepositoryManager/ZIP_Wrapper.h b/CIAO/DAnCE/RepositoryManager/ZIP_Wrapper.h
index d95f1b7f575..918a60f6352 100644
--- a/CIAO/DAnCE/RepositoryManager/ZIP_Wrapper.h
+++ b/CIAO/DAnCE/RepositoryManager/ZIP_Wrapper.h
@@ -12,8 +12,8 @@
* class that allows a program to become ZIP-aware
*
* @author Stoyan Paunov, Vipul Singh
- *
- *
+ *
+ *
*/
//=======================================================================
@@ -28,7 +28,6 @@
#include "ace/OS_NS_fcntl.h" //for open
#include "ace/OS_NS_sys_stat.h" //for filesize and mkdir
-#include <string>
#include "unzip.h"
@@ -59,30 +58,30 @@ public:
class ZIP_Wrapper
{
public:
-
+
/// Get file and store it into an ACE_Message_Block. The function
- /// averts subdirectory traversal problems.
+ /// averts subdirectory traversal problems.
/// NOTE: Be sure to release the message block even if the function returns
- /// false becuase the return value might be due to unsuccessful allocation
-
+ /// false becuase the return value might be due to unsuccessful allocation
+
///archive_path is the zip archive with the path
///filename is the name of the file to be looked for in the zip archive.
///the file is stored in ACE message block.
- static bool get_file (char* archive_path, char* filename,
- ACE_Message_Block &file);
+ static bool get_file (char* archive_path, char* filename,
+ ACE_Message_Block &file);
/// uncompress the zip file
- /// The zip file will be uncompressed into a directory with the
+ /// The zip file will be uncompressed into a directory with the
///name of zip archive.
/// The path is assumed to be an existing directory
-
+
///zip_archive is the arcive to be uncompressed with full path.
///path is used for creating a directory with the name of zip archive.
static bool uncompress (char* zip_archive, char* path = "",
bool verbose = true);
/// Get a list of the files in the archive
-
+
///zip_name is the name of zipfile with fullpath.
///list stores information about each entry in zip file.
static int file_list_info (char* zip_name,
@@ -91,25 +90,25 @@ public:
///Check if an entry of a zip file is a file or directory
///We assume a directoryname terminates with a forward slash
///Returns 1 for directory while 0 for file.
-
+
///filename_inzip is an entry in a zipfile
- static int checkdir (char* filename_inzip);
+ static int checkdir (char* filename_inzip);
///Create directory structure if entry in zipfile is a directory
-
+
///filename_inzip is an entry in a zipfile
///arch_dir stores the name of the directory to be created
static int makethedir (char* filename_inzip, ACE_CString arch_dir);
///If entry in zipfile is a file, then read the file and write
/// the uncompressed data at the proper filepath.
-
+
///filename_inzip is an entry in a zipfile
///uf refers to the zip archive
///file_info is used to get information about current file
///verbose decides if the details are to be printed or not
- ///arch_dir is the name of file with full path where it is to be
- ///uncompressed
+ ///arch_dir is the name of file with full path where it is to be
+ ///uncompressed
static int handlethefile (char* filename_inzip, unzFile uf,
unz_file_info file_info,
bool verbose, ACE_CString arch_dir);
diff --git a/CIAO/DAnCE/TargetManager/CmpClient.cpp b/CIAO/DAnCE/TargetManager/CmpClient.cpp
index dd540ec3d8b..1098cb1f8d8 100644
--- a/CIAO/DAnCE/TargetManager/CmpClient.cpp
+++ b/CIAO/DAnCE/TargetManager/CmpClient.cpp
@@ -9,8 +9,8 @@
* TM to getAllResources and getAvailable resources
*/
-#include "Deployment_DataC.h"
-#include "TargetManagerImplC.h"
+#include "ciao/Deployment_DataC.h"
+#include "DAnCE/TargetManager/TargetManagerImplC.h"
#include "ace/streams.h"
#include "Config_Handlers/DnC_Dump.h"
@@ -105,7 +105,7 @@ int main (int argc, char* argv[])
plan.instance[1] = instance_;
- bool resource_available = 1;
+ bool resource_available = true;
try
{
@@ -141,11 +141,11 @@ int main (int argc, char* argv[])
// Make a call to release resources , if resource < 0
try
{
- if (resource_available == 0)
- {
- targetI->releaseResources(plan);
- ACE_DEBUG ((LM_DEBUG , "\n\nreleaseResources Returned \n"));
- }
+ if (!resource_available)
+ {
+ targetI->releaseResources(plan);
+ ACE_DEBUG ((LM_DEBUG , "\n\nreleaseResources Returned \n"));
+ }
}
catch(CORBA::NO_IMPLEMENT &)
{
@@ -171,7 +171,7 @@ int main (int argc, char* argv[])
::CORBA::StringSeq elements;
elements.length (0);
- bool Add = 1;
+ bool Add = true;
Add = ACE_OS::atoi (argv[3]);
if (Add)
diff --git a/CIAO/DAnCE/TargetManager/Deployment_Configuration.cpp b/CIAO/DAnCE/TargetManager/Deployment_Configuration.cpp
index 6b5325e840c..0ded6b5492f 100644
--- a/CIAO/DAnCE/TargetManager/Deployment_Configuration.cpp
+++ b/CIAO/DAnCE/TargetManager/Deployment_Configuration.cpp
@@ -30,7 +30,7 @@ CIAO::Deployment_Configuration::init (const char *filename)
FILE *inf = ACE_OS::fopen (filename, "r");
- if (inf == NULL)
+ if (inf == 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
"DAnCE (%P|%t) Deployment_Configuration.cpp:"
@@ -40,7 +40,7 @@ CIAO::Deployment_Configuration::init (const char *filename)
}
char destination[NAME_BUFSIZE], ior[NAME_BUFSIZE];
- int first = 1;
+ bool first = true;
while (fscanf (inf, "%s %s", destination, ior ) != EOF)
{
@@ -58,7 +58,7 @@ CIAO::Deployment_Configuration::init (const char *filename)
if (first)
{
this->default_node_manager_.IOR_ = ior;
- first = 0;
+ first = false;
}
}
return 0;
diff --git a/CIAO/DAnCE/TargetManager/DomainDataManager.h b/CIAO/DAnCE/TargetManager/DomainDataManager.h
index 2e39022dce4..3b239a41ae0 100644
--- a/CIAO/DAnCE/TargetManager/DomainDataManager.h
+++ b/CIAO/DAnCE/TargetManager/DomainDataManager.h
@@ -38,7 +38,6 @@ namespace CIAO
public :
/**
- * @operation updateDomain
* @brief This function is called by the other classes to update
* current domain data.
* @param elements The string sequence of elements
@@ -52,7 +51,6 @@ namespace CIAO
::Deployment::DomainUpdateKind updateKind
);
/**
- * @operation getInitialDomain
* @brief This function is called the Executor code
* to get the Original Domain data.
* @return Domain* The Initial Domain
@@ -61,7 +59,6 @@ namespace CIAO
::Deployment::Domain* get_initial_domain ();
/**
- * @operation getCurrentDomain
* @brief This function is called the Executor code
* to get the Current Domain data.
* @return Domain* The Current Domain
@@ -70,7 +67,6 @@ namespace CIAO
/**
- * @operation create
* @brief This function is called to create the Datamanager
* @param orb The orb pointer
* @param target The Target Manager Object Reference
@@ -83,7 +79,6 @@ namespace CIAO
);
/**
- * @operation get_data_manager
* @brief Returns the static pointer to the
* data manager.
* @return DomainDataManager*
@@ -93,23 +88,18 @@ namespace CIAO
static DomainDataManager* get_data_manager ();
/**
- * @operation delete_data_manager
* @brief deletes the data manager
*/
-
static void delete_data_manger ();
/**
- * @operation get_node_managers
* @brief returns the sequence of node managers
* object reference
*/
-
CIAO::Host_NodeManager_seq *
get_node_managers ();
/**
- * @operation get_cpu_info
* @brief returns the node specific cpu utilization
*
* @return CIAO::Host_Infos*
@@ -118,7 +108,6 @@ namespace CIAO
CIAO::Host_Infos* get_cpu_info ();
/**
- * @operation get_pid
* @brief returns the pid of the component id submitted
* @param cmp The component id
*
@@ -127,7 +116,6 @@ namespace CIAO
CORBA::Long get_pid (ACE_CString cmp);
/**
- * @operation commitResources
* @brief commits the resources that are specified
* in the plan.
* @param plan ::Deployment::DeploymentPlan
@@ -142,17 +130,14 @@ namespace CIAO
const ::Deployment::DeploymentPlan & plan);
/**
- * @operation releaseResources
* @brief The function releases the resources held by a plan
- *
- * @param argname ::Deployment::DeploymentPlan the plan whose
+ * @param plan ::Deployment::DeploymentPlan the plan whose
* resources are to be released
*/
void releaseResources (
const ::Deployment::DeploymentPlan& plan);
/**
- * @operation stop_monitors
* @brief The function makes a call on the leaveDomain on the
* NodeManager
*
@@ -166,7 +151,6 @@ namespace CIAO
/**
- * @operation Constructor
* @param orb The orb pointer
* @param target The Target Manager Object Reference
* @description The constructor made proteccted so that no one can create
@@ -177,14 +161,12 @@ namespace CIAO
);
/**
- * @operation readinDomainData
* @brief It will read the initial Domain data from
* XML files.
*/
int readin_domain_data ();
/**
- * @operation match_requirement_resource
* @brief Match the deployed resources to the
* available resource
*/
@@ -194,7 +176,6 @@ namespace CIAO
);
/**
- * @operation match_properties
* @brief Match the properties of a Requirement to the
* properties of available resource
* @param deployed The deployed Properties
@@ -206,11 +187,10 @@ namespace CIAO
::Deployment::SatisfierProperties& available);
- /// The different actiona that can take place
- enum Action {commit , release};
+ /// The different actiona that can take place
+ enum Action {commit , release};
/**
- * @operation commit_release_resource
* @brief Either commits or releases the given resource
* based on the current Action set.
* @param deployed ::Deployment::Property is the resource
@@ -226,14 +206,12 @@ namespace CIAO
::Deployment::SatisfierProperty & available);
/**
- * @operation call_all_node_managers
* @brief This function calls all NM and gives them
* the sub-domain
*/
int call_all_node_managers ();
/**
- * @operation add_to_domain
* @brief This function add new elements to the
* already existing domain
*
@@ -243,7 +221,6 @@ namespace CIAO
int add_to_domain (const ::Deployment::Domain& domain);
/**
- * @operation delete_from_domain
* @brief This function deletes elements from the domain
*
* @param domain ::Deployment::Domain contains the new elements
@@ -252,7 +229,6 @@ namespace CIAO
int delete_from_domain (const ::Deployment::Domain& domain);
/**
- * @operation intimate_planner
* @brief This function intimates the planner about a domain
* change
*
@@ -262,7 +238,6 @@ namespace CIAO
int intimate_planner (const ::Deployment::Domain& domain);
/**
- * @operation find_in_initial_domain
* @brief This function finds a new node in the initial_domain
*
* @param node The name of the node which is to be searched
@@ -271,20 +246,16 @@ namespace CIAO
bool find_in_initial_domain (const char* node_name,
::Deployment::Node& node);
/**
- * @operation find_in_provisioned_domain
* @brief This function finds a new node in the proviosiond_domain
*
* @param node The name of the node which is to be searched
*/
-
bool find_in_provisioned_domain (const char* node_name,
::Deployment::Node& node);
/**
- * @operation update_node_status
* @brief updates the node status by reading it from a file
*/
-
bool update_node_status ();
/// The ORB pointer
@@ -316,7 +287,7 @@ namespace CIAO
*/
::Deployment::Domain provisioned_data_;
- ///The current action
+ /// The current action
Action current_action_;
};
diff --git a/CIAO/DAnCE/TargetManager/DomainEvents.idl b/CIAO/DAnCE/TargetManager/DomainEvents.idl
index 1196a822a44..4252f360a00 100644
--- a/CIAO/DAnCE/TargetManager/DomainEvents.idl
+++ b/CIAO/DAnCE/TargetManager/DomainEvents.idl
@@ -8,7 +8,6 @@
#ifndef DOMAIN_CHANGE_IDL
#define DOMAIN_CHANGE_IDL
-#include "ciao/Deployment_TargetData.idl"
#include "ciao/Deployment_TargetManager.idl"
#include "ciao/CCM_Event.idl"
diff --git a/CIAO/DAnCE/TargetManager/TM_Client.mpc b/CIAO/DAnCE/TargetManager/TM_Client.mpc
index e332b49bb27..edb84615bae 100644
--- a/CIAO/DAnCE/TargetManager/TM_Client.mpc
+++ b/CIAO/DAnCE/TargetManager/TM_Client.mpc
@@ -5,11 +5,8 @@
project(TMClient): ciao_client_dnc,ciao_deployment_stub, ciao_config_handlers, ciao_events_dnc {
after += CIAO_TargetManager_stub
- includes += $(CIAO_ROOT)/DAnCE $(TAO_ROOT)/orbsvcs
- includes += $(CIAO_ROOT)/DAnCE/TargetManager
libs += TargetManager_stub NodeManager_stub
-
IDL_Files {
}
diff --git a/CIAO/DAnCE/TargetManager/TargetManager_exec.cpp b/CIAO/DAnCE/TargetManager/TargetManager_exec.cpp
index 2c22d608ecb..30c4024e981 100644
--- a/CIAO/DAnCE/TargetManager/TargetManager_exec.cpp
+++ b/CIAO/DAnCE/TargetManager/TargetManager_exec.cpp
@@ -108,9 +108,10 @@ namespace CIDL_TargetManager_i
{
// Your code here.
if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG , ".. Update Domain called ...\n"));
- }
+ {
+ ACE_DEBUG ((LM_DEBUG , ".. Update Domain called ...\n"));
+ }
+
CIAO::DomainDataManager::
get_data_manager ()->update_domain (
elements,