summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Mesnier <mesnierp@ociweb.com>2016-03-17 11:44:42 -0500
committerPhil Mesnier <mesnierp@ociweb.com>2016-03-17 11:45:22 -0500
commit4498f95388a4dc8574516e764af576a9450880d3 (patch)
tree42ebf9a5ada5101932465f75b70e16656f1505ee
parent2ba4f318fb231e052889bdfdcb83b46f28f6b13d (diff)
downloadATCD-4498f95388a4dc8574516e764af576a9450880d3.tar.gz
Clean up various Coverity and scoreboard issues
-rw-r--r--TAO/bin/name_tests.lst29
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp1
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp22
-rw-r--r--TAO/orbsvcs/tests/FT_Naming/stress_storable/client.cpp20
-rwxr-xr-xTAO/orbsvcs/tests/Simple_Naming/run_test.pl180
-rwxr-xr-xTAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl4
-rw-r--r--TAO/tao/Storable_Base.h21
-rw-r--r--TAO/tao/Storable_FlatFileStream.cpp67
-rw-r--r--TAO/tao/Storable_FlatFileStream.h21
-rw-r--r--TAO/utils/logWalker/Session.cpp17
10 files changed, 244 insertions, 138 deletions
diff --git a/TAO/bin/name_tests.lst b/TAO/bin/name_tests.lst
new file mode 100644
index 00000000000..beafdf97ac7
--- /dev/null
+++ b/TAO/bin/name_tests.lst
@@ -0,0 +1,29 @@
+# $Id$
+#
+# This is the list of run_test.pl's that need to be run by
+# auto_run_tests.pl.
+# Each line has its own test, and a test can be followed by a
+# list of configurations it does _not_ run on.
+#
+# Example: TAO\examples\foo\run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST
+#
+# NOTE: This file contains examples and other service level test for
+# TAO's. Please do not include regular tests here.
+TAO/orbsvcs/tests/Simple_Naming/run_test.pl: !ST !NO_MESSAGING !ACE_FOR_TAO !LynxOS !CORBA_E_MICRO !DISTRIBUTED !OSX
+TAO/orbsvcs/tests/Simple_Naming/run_test.pl -nommap: !ST !NO_MESSAGING !ACE_FOR_TAO !LynxOS !CORBA_E_MICRO !DISTRIBUTED OSX
+TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl: !ST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NO_MESSAGING !ACE_FOR_TAO !DISTRIBUTED
+TAO/orbsvcs/tests/Simple_Naming/run_test_ft.pl: !Win32 !ST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NO_MESSAGING !ACE_FOR_TAO !DISTRIBUTED
+TAO/orbsvcs/tests/Redundant_Naming/run_test.pl: !Win32 !ST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !DISTRIBUTED
+TAO/orbsvcs/tests/Simple_Naming/run_test_ipv6.pl: IPV6 !ST !NO_MESSAGING !ACE_FOR_TAO !LynxOS !CORBA_E_MICRO !DISTRIBUTED
+TAO/orbsvcs/DevGuideExamples/NamingService/Messenger/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO !LynxOS
+TAO/orbsvcs/DevGuideExamples/NamingService/Naming_Client/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO !LynxOS
+TAO/orbsvcs/DevGuideExamples/NamingService/Naming_Context_Ext/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO !LynxOS
+TAO/orbsvcs/DevGuideExamples/NamingService/Naming_Server/run_test.pl: !ST !NO_MCAST !NO_MESSAGING !CORBA_E_COMPACT !CORBA_E_MICRO
+TAO/orbsvcs/DevGuideExamples/NamingService/corbaloc_Messenger/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO !LynxOS
+TAO/orbsvcs/DevGuideExamples/NamingService/corbaname_Messenger/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO !LynxOS
+TAO/utils/nsgroup/run_test.pl: !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !STATIC !ACE_FOR_TAO !LynxOS !ST
+TAO/orbsvcs/tests/FT_Naming/Load_Balancing/run_test.pl: !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !LynxOS !ST
+TAO/orbsvcs/tests/FT_Naming/Replication/run_test.pl: !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !LynxOS !ST
+TAO/orbsvcs/tests/FT_Naming/FaultTolerant/run_test.pl: !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !LynxOS !ST
+TAO/orbsvcs/tests/FT_Naming/Federation/run_test.pl: !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !LynxOS !ST
+TAO/orbsvcs/tests/FT_Naming/stress_storable/run_test.pl: !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !LynxOS !ST
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp
index 3d0b5b8d2d3..bc47fbefc79 100644
--- a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp
@@ -31,6 +31,7 @@ ImR_Activator_i::ImR_Activator_i (void)
, name_ (getHostName ())
, env_buf_len_ (Activator_Options::ENVIRONMENT_BUFFER)
, max_env_vars_ (Activator_Options::ENVIRONMENT_MAX_VARS)
+, detach_child_ (false)
{
}
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp
index 009c2da80df..d38369a853d 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp
@@ -217,17 +217,13 @@ TAO::PG_Group_List_Store::read (TAO::Storable_Base & stream)
stream.rewind ();
- unsigned int next_group_id;
- stream >> next_group_id;
- this->next_group_id_ = next_group_id;
+ stream >> this->next_group_id_;
- int size;
+ size_t size;
stream >> size;
- // TODO: Look at adding streaming of unsigned long long
- // PortableGroup::ObjectGroupId group_id;
- int group_id;
- for (int i = 0; i < size; ++i)
+ PortableGroup::ObjectGroupId group_id;
+ for (size_t i = 0; i < size; ++i)
{
stream >> group_id;
group_ids_.insert (group_id);
@@ -239,16 +235,12 @@ TAO::PG_Group_List_Store::write (TAO::Storable_Base & stream)
{
stream.rewind ();
- unsigned int next_group_id = static_cast<unsigned int> (this->next_group_id_);
- stream << next_group_id;
-
- int size = group_ids_.size ();
- stream << size;
+ stream << this->next_group_id_;
+ stream << group_ids_.size ();
for (Group_Id_Const_Iterator it = group_ids_.begin ();
it != group_ids_.end (); ++it)
{
- int group_id = static_cast<int> (*it);
- stream << group_id;
+ stream << *it;
}
stream.flush ();
diff --git a/TAO/orbsvcs/tests/FT_Naming/stress_storable/client.cpp b/TAO/orbsvcs/tests/FT_Naming/stress_storable/client.cpp
index 2a778d7a8c8..a1a3408ed4a 100644
--- a/TAO/orbsvcs/tests/FT_Naming/stress_storable/client.cpp
+++ b/TAO/orbsvcs/tests/FT_Naming/stress_storable/client.cpp
@@ -17,11 +17,18 @@ class Hammer : public ACE_Task_Base
NS_group_svc group_svc;
public:
- Hammer (CORBA::ORB_ptr orb, FT_Naming::NamingManager_ptr nm)
+ Hammer ()
: group_svc(true)
+ {}
+
+ int setup (CORBA::ORB_ptr orb, FT_Naming::NamingManager_ptr nm)
{
- group_svc.set_orb (orb);
- group_svc.set_naming_manager (nm);
+ if (group_svc.set_orb (orb) != 0 || group_svc.set_naming_manager (nm))
+ {
+ ACE_DEBUG ((LM_DEBUG, "Hammer setup failed\n"));
+ return -1;
+ }
+ return 0;
}
int svc (void)
@@ -116,7 +123,12 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
- Hammer hammer (orb.in(), naming_manager.in());
+ Hammer hammer;
+
+ if (hammer.setup(orb.in(), naming_manager.in()) == -1)
+ {
+ return 1;
+ }
CosNaming::Name name (1);
name.length (1);
diff --git a/TAO/orbsvcs/tests/Simple_Naming/run_test.pl b/TAO/orbsvcs/tests/Simple_Naming/run_test.pl
index 7d7af0428bd..f446b8ad818 100755
--- a/TAO/orbsvcs/tests/Simple_Naming/run_test.pl
+++ b/TAO/orbsvcs/tests/Simple_Naming/run_test.pl
@@ -18,10 +18,19 @@ $multicast = '224.9.9.2';
$startdir = getcwd();
$quiet = 0;
+$skip_mmap = 0;
+$mt_only = 0;
-# check for -q flag
-if ($ARGV[0] eq '-q') {
- $quiet = 1;
+foreach $i (@ARGV) {
+ if ($i eq '-q') {
+ $quiet = 1;
+ }
+ elsif ($i eq '-nommap') {
+ $skip_mmap = 1;
+ }
+ elsif ($i eq '-mtonly') {
+ $mt_only = 1;
+ }
}
my $test = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
@@ -81,7 +90,7 @@ sub name_server
exit 1;
}
- sleep(10);
+ sleep(1);
}
sub client
@@ -104,94 +113,105 @@ sub client
## initialization problem (within the Naming_Service)
## that has only been seen on Windows XP.
-# Options for all simple tests recognized by the 'client' program.
-@opts = ("-s -ORBInitRef NameService=file://$test_iorfile",
- "-p $test_persistent_ior_file -ORBInitRef NameService=file://$test_iorfile",
- "-s -ORBInitRef NameService=mcast://$multicast:$ns_multicast_port\::/NameService",
- "-t -ORBInitRef NameService=file://$test_iorfile",
- "-i -ORBInitRef NameService=file://$test_iorfile",
- "-e -ORBInitRef NameService=file://$test_iorfile",
- "-y -ORBInitRef NameService=file://$test_iorfile",
- "-c file://$test_persistent_ior_file -ORBInitRef NameService=file://$test_iorfile",
- );
-
-$hostname = $test->HostName ();
-
-@server_opts = ("-t 30",
- "-ORBEndpoint iiop://$hostname:$ns_orb_port -f $test_persistent_log_file",
- "", "", "", "", "",
- "-ORBEndpoint iiop://$hostname:$ns_orb_port -f $test_persistent_log_file",
- );
-
-@comments = ("Simple Test: \n",
- "mmap() Persistent Test (Part 1): \n",
- "Simple Test (using multicast to locate the server): \n",
- "Tree Test: \n",
- "Iterator Test: \n",
- "Exceptions Test: \n",
- "Destroy Test: \n",
- "mmap() Persistent Test (Part 2): \n",
- );
-
-$test_number = 0;
-
-
-print "INFO: Running the test in ", getcwd(), "\n";
-
-# Run server and client for each of the tests. Client uses ior in a
-# file to bootstrap to the server.
-foreach $o (@opts) {
- name_server ($server_opts[$test_number]);
-
- print STDERR "\n ".$comments[$test_number];
-
- client ($o);
-
- $SV->Kill ();
-
- ## For some reason, only on Windows XP, we need to
- ## wait before starting another tao_cosnaming when
- ## the mmap persistence option is used
- if ($^O eq "MSWin32") {
- sleep(1);
+sub common_tests
+{
+ # Options for all simple tests recognized by the 'client' program.
+ @opts = ("-s -ORBInitRef NameService=file://$test_iorfile",
+ "-p $test_persistent_ior_file -ORBInitRef NameService=file://$test_iorfile",
+ "-s -ORBInitRef NameService=mcast://$multicast:$ns_multicast_port\::/NameService",
+ "-t -ORBInitRef NameService=file://$test_iorfile",
+ "-i -ORBInitRef NameService=file://$test_iorfile",
+ "-e -ORBInitRef NameService=file://$test_iorfile",
+ "-y -ORBInitRef NameService=file://$test_iorfile",
+ "-c file://$test_persistent_ior_file -ORBInitRef NameService=file://$test_iorfile",
+ );
+
+ $hostname = $test->HostName ();
+
+ @server_opts = ("-t 30",
+ "-ORBEndpoint iiop://$hostname:$ns_orb_port -f $test_persistent_log_file",
+ "", "", "", "", "",
+ "-ORBEndpoint iiop://$hostname:$ns_orb_port -f $test_persistent_log_file",
+ );
+
+ @comments = ("Simple Test: \n",
+ "mmap() Persistent Test (Part 1): \n",
+ "Simple Test (using multicast to locate the server): \n",
+ "Tree Test: \n",
+ "Iterator Test: \n",
+ "Exceptions Test: \n",
+ "Destroy Test: \n",
+ "mmap() Persistent Test (Part 2): \n",
+ );
+
+ $test_number = 0;
+
+ print "INFO: Running the test in ", getcwd(), "\n";
+
+ # Run server and client for each of the tests. Client uses ior in a
+ # file to bootstrap to the server.
+ foreach $o (@opts) {
+ if (index($comments[$test_number],"mmap") != -1 && $skip_mmap == 1) {
+ print STDERR "\n *** skipping ".$comments[$test_number];
+ }
+ else {
+ name_server ($server_opts[$test_number]);
+ print STDERR "\n ".$comments[$test_number];
+ client ($o);
+ $SV->Kill ();
+ }
+ ## For some reason, only on Windows XP, we need to
+ ## wait before starting another tao_cosnaming when
+ ## the mmap persistence option is used
+ if ($^O eq "MSWin32") {
+ sleep(1);
+ }
+ $test_number++;
}
- $test_number++;
-}
-$test->DeleteFile($persistent_ior_file);
-$test->DeleteFile($persistent_log_file);
-$test->DeleteFile($iorfile);
+ $test->DeleteFile($persistent_ior_file);
+ $test->DeleteFile($persistent_log_file);
+ $test->DeleteFile($iorfile);
-# Now run the multithreaded test, sending output to the file.
-print STDERR "\n Multithreaded Test:\n";
-$test->DeleteFile ($data_file);
+}
-name_server ();
-client ("-ORBInitRef NameService=file://$test_iorfile -ORBLogFile $test_log", "-m15");
+sub mt_test ()
+{
+ # Now run the multithreaded test, sending output to the file.
+ print STDERR "\n Multithreaded Test:\n";
+ $test->DeleteFile ($data_file);
+ name_server ("");
+ client ("-ORBInitRef NameService=file://$test_iorfile -ORBLogFile $test_log", "-m15");
-$SV->Kill ();
+ $SV->Kill ();
-$errors = system ("perl $startdir/process-m-output.pl $test_log 15") >> 8;
+ $errors = system ("perl $startdir/process-m-output.pl $test_log 15") >> 8;
-if ($errors > 0) {
- $status = 1;
+ if ($errors > 0) {
+ $status = 1;
- if (!$quiet) {
- print STDERR "Errors Detected, printing output\n";
- if (open (DATA, "<$test_log")) {
- print STDERR "================================= Begin\n";
- print STDERR <DATA>;
- print STDERR "================================= End\n";
- close (DATA);
- }
- else {
- print STDERR "ERROR: Could not open $test_log\n";
+ if (!$quiet) {
+ print STDERR "Errors Detected, printing output\n";
+ if (open (DATA, "<$test_log")) {
+ print STDERR "================================= Begin\n";
+ print STDERR <DATA>;
+ print STDERR "================================= End\n";
+ close (DATA);
+ }
+ else {
+ print STDERR "ERROR: Could not open $test_log\n";
+ }
+ $test->DeleteFile ($data_file);
}
- $test->DeleteFile ($data_file);
}
+
+ $test->DeleteFile($iorfile);
}
-$test->DeleteFile($iorfile);
+##############################################################################
+
+common_tests () if (!$mt_only);
+mt_test ();
exit $status;
diff --git a/TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl b/TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl
index ecd1f4774dc..3e27dd7b652 100755
--- a/TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl
+++ b/TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl
@@ -24,6 +24,7 @@ my $test = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed
# Variables for command-line arguments to client and server
# executables.
+$multicast = '224.9.9.2';
$ns_multicast_port = 10001 + $test->RandomPort(); # Can not be 10000 on Chorus 4.0
$ns_orb_port = 12000 + $test->RandomPort();
@@ -43,8 +44,7 @@ $test->DeleteFile($persistent_ior_file);
sub name_server
{
- my $args = "-ORBNameServicePort $ns_multicast_port -o $test_iorfile -m 1 @_";
-
+ my $args = "-o $test_iorfile @_";
$SV = $test->CreateProcess ("$prog", "$args");
diff --git a/TAO/tao/Storable_Base.h b/TAO/tao/Storable_Base.h
index bd290a75e33..14f4f2af7f1 100644
--- a/TAO/tao/Storable_Base.h
+++ b/TAO/tao/Storable_Base.h
@@ -101,17 +101,16 @@ namespace TAO
/// Returns 0 on success, otherwise EOF
virtual int sync (void) = 0;
- virtual Storable_Base& operator << (const ACE_CString& str) = 0;
-
- virtual Storable_Base& operator >> (ACE_CString& str) = 0;
-
- virtual Storable_Base& operator << (int i) = 0;
-
- virtual Storable_Base& operator >> (int &i) = 0;
-
- virtual Storable_Base& operator << (unsigned int i) = 0;
-
- virtual Storable_Base& operator >> (unsigned int &i) = 0;
+ virtual Storable_Base& operator << (const ACE_CString&) = 0;
+ virtual Storable_Base& operator >> (ACE_CString&) = 0;
+ virtual Storable_Base& operator << (ACE_UINT32 ) = 0;
+ virtual Storable_Base& operator >> (ACE_UINT32 &) = 0;
+ virtual Storable_Base& operator << (ACE_UINT64 ) = 0;
+ virtual Storable_Base& operator >> (ACE_UINT64 &) = 0;
+ virtual Storable_Base& operator << (ACE_INT32 ) = 0;
+ virtual Storable_Base& operator >> (ACE_INT32 &) = 0;
+ virtual Storable_Base& operator << (ACE_INT64 ) = 0;
+ virtual Storable_Base& operator >> (ACE_INT64 &) = 0;
virtual Storable_Base& operator << (const TAO_OutputCDR & cdr) = 0;
diff --git a/TAO/tao/Storable_FlatFileStream.cpp b/TAO/tao/Storable_FlatFileStream.cpp
index 520eb3aebfb..eb007308e00 100644
--- a/TAO/tao/Storable_FlatFileStream.cpp
+++ b/TAO/tao/Storable_FlatFileStream.cpp
@@ -85,7 +85,7 @@ namespace
char buffer[BUFSIZ];
size_t n_read;
- while (!::feof (f1))
+ while (!feof (f1))
{
n_read =
ACE_OS::fread(buffer, 1, sizeof(buffer), f1);
@@ -93,7 +93,7 @@ namespace
{
if (ACE_OS::fwrite(buffer, 1, n_read, f2) != n_read)
{
- ::ferror (f2);
+ ferror (f2);
if (TAO_debug_level > 0)
{
TAOLIB_ERROR ((LM_ERROR,
@@ -106,9 +106,9 @@ namespace
else
{
errno = 0;
- if (!::feof (f1))
+ if (!feof (f1))
{
- ::ferror (f1);
+ ferror (f1);
if (TAO_debug_level > 0)
{
TAOLIB_ERROR ((LM_ERROR,
@@ -452,44 +452,87 @@ TAO::Storable_FlatFileStream::operator >> (ACE_CString& str)
}
TAO::Storable_Base &
-TAO::Storable_FlatFileStream::operator << (int i)
+TAO::Storable_FlatFileStream::operator << (ACE_UINT32 i)
{
- int const n = ACE_OS::fprintf (this->fl_, "%d\n", i);
+ int const n =
+ ACE_OS::fprintf (this->fl_, ACE_UINT32_FORMAT_SPECIFIER_ASCII "\n", i);
if (n < 0)
this->throw_on_write_error (badbit);
return *this;
}
TAO::Storable_Base &
-TAO::Storable_FlatFileStream::operator >> (int &i)
+TAO::Storable_FlatFileStream::operator >> (ACE_UINT32 &i)
{
Storable_State state = this->rdstate ();
- read_integer ("%d\n", i, state, fl_);
+ read_integer (ACE_UINT32_FORMAT_SPECIFIER_ASCII "\n", i, state, fl_);
this->throw_on_read_error (state);
return *this;
}
TAO::Storable_Base &
-TAO::Storable_FlatFileStream::operator << (unsigned int i)
+TAO::Storable_FlatFileStream::operator << (ACE_UINT64 i)
{
- int const n = ACE_OS::fprintf (this->fl_, "%u\n", i);
+ int const n =
+ ACE_OS::fprintf (this->fl_, ACE_UINT64_FORMAT_SPECIFIER_ASCII "\n", i);
if (n < 0)
this->throw_on_write_error (badbit);
return *this;
}
TAO::Storable_Base &
-TAO::Storable_FlatFileStream::operator >> (unsigned int &i)
+TAO::Storable_FlatFileStream::operator >> (ACE_UINT64 &i)
{
Storable_State state = this->rdstate ();
- read_integer ("%u\n", i, state, fl_);
+ read_integer (ACE_UINT64_FORMAT_SPECIFIER_ASCII "\n", i, state, fl_);
this->throw_on_read_error (state);
return *this;
}
TAO::Storable_Base &
+TAO::Storable_FlatFileStream::operator << (ACE_INT32 i)
+{
+ int const n =
+ ACE_OS::fprintf (this->fl_, ACE_INT32_FORMAT_SPECIFIER_ASCII "\n", i);
+ if (n < 0)
+ this->throw_on_write_error (badbit);
+ return *this;
+}
+
+TAO::Storable_Base &
+TAO::Storable_FlatFileStream::operator >> (ACE_INT32 &i)
+{
+ Storable_State state = this->rdstate ();
+ read_integer (ACE_INT32_FORMAT_SPECIFIER_ASCII "\n", i, state, fl_);
+ this->throw_on_read_error (state);
+
+ return *this;
+}
+
+TAO::Storable_Base &
+TAO::Storable_FlatFileStream::operator << (ACE_INT64 i)
+{
+ int const n =
+ ACE_OS::fprintf (this->fl_, ACE_INT64_FORMAT_SPECIFIER_ASCII "\n", i);
+ if (n < 0)
+ this->throw_on_write_error (badbit);
+ return *this;
+}
+
+TAO::Storable_Base &
+TAO::Storable_FlatFileStream::operator >> (ACE_INT64 &i)
+{
+ Storable_State state = this->rdstate ();
+ read_integer (ACE_INT64_FORMAT_SPECIFIER_ASCII "\n", i, state, fl_);
+ this->throw_on_read_error (state);
+
+ return *this;
+}
+
+
+TAO::Storable_Base &
TAO::Storable_FlatFileStream::operator << (const TAO_OutputCDR & cdr)
{
unsigned int const length =
diff --git a/TAO/tao/Storable_FlatFileStream.h b/TAO/tao/Storable_FlatFileStream.h
index f213dbe0a74..bfa0b2b39c0 100644
--- a/TAO/tao/Storable_FlatFileStream.h
+++ b/TAO/tao/Storable_FlatFileStream.h
@@ -73,17 +73,16 @@ namespace TAO
/// Returns 0 on success, otherwise EOF
virtual int sync (void);
- virtual Storable_Base& operator << (const ACE_CString& str);
-
- virtual Storable_Base& operator >> (ACE_CString& str);
-
- virtual Storable_Base& operator << (int i);
-
- virtual Storable_Base& operator >> (int &i);
-
- virtual Storable_Base& operator << (unsigned int i);
-
- virtual Storable_Base& operator >> (unsigned int &i);
+ virtual Storable_Base& operator << (const ACE_CString&);
+ virtual Storable_Base& operator >> (ACE_CString&);
+ virtual Storable_Base& operator << (ACE_UINT32 );
+ virtual Storable_Base& operator >> (ACE_UINT32 &);
+ virtual Storable_Base& operator << (ACE_UINT64 );
+ virtual Storable_Base& operator >> (ACE_UINT64 &);
+ virtual Storable_Base& operator << (ACE_INT32 );
+ virtual Storable_Base& operator >> (ACE_INT32 &);
+ virtual Storable_Base& operator << (ACE_INT64 );
+ virtual Storable_Base& operator >> (ACE_INT64 &);
virtual Storable_Base& operator << (const TAO_OutputCDR & cdr);
diff --git a/TAO/utils/logWalker/Session.cpp b/TAO/utils/logWalker/Session.cpp
index 59a630a4dbf..a52574afb77 100644
--- a/TAO/utils/logWalker/Session.cpp
+++ b/TAO/utils/logWalker/Session.cpp
@@ -187,20 +187,31 @@ Session::stream_for ( ostream *oldstream, HostProcess *hp, const char *sub, cons
if (oldstream == 0 && hp == 0)
{
- ACE_OS::mkdir(this->base_dir_.c_str());
+ if (ACE_OS::mkdir(outname.c_str()) != 0 && errno != EEXIST)
+ ACE_ERROR ((LM_ERROR,
+ "Session::stream_for unable to make dir %C, %p\n",
+ outname.c_str(), "mkdir"));
}
delete oldstream;
outname += ACE_DIRECTORY_SEPARATOR_CHAR;
if (hp != 0)
{
outname += hp->proc_name();
- ACE_OS::mkdir(outname.c_str());
+ if (ACE_OS::mkdir(outname.c_str()) != 0 && errno != EEXIST)
+ ACE_ERROR ((LM_ERROR,
+ "Session::stream_for unable to make dir %C, %p\n",
+ outname.c_str(), "mkdir"));
+
outname += ACE_DIRECTORY_SEPARATOR_CHAR;
}
outname += (sub == 0) ? "summary.txt" : sub;
if (detail != 0)
{
- ACE_OS::mkdir(outname.c_str());
+ if (ACE_OS::mkdir(outname.c_str()) != 0 && errno != EEXIST)
+ ACE_ERROR ((LM_ERROR,
+ "Session::stream_for unable to make dir %C, %p\n",
+ outname.c_str(), "mkdir"));
+
outname += ACE_DIRECTORY_SEPARATOR_CHAR;
outname += detail;
}