summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-10-23 17:38:53 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-10-23 17:38:53 +0000
commit704b721d334c226c394e3380bcbe243b9e6275a5 (patch)
tree337f9b0c464bce2786c86b131e1994ad97b08181
parentfb6b94c6c5fce45522f9f84e9ddcc4b280e974c9 (diff)
downloadATCD-704b721d334c226c394e3380bcbe243b9e6275a5.tar.gz
ChangeLogTag:Wed Oct 23 17:20:18 UTC 2002 Don Hinton <dhinton@ieee.org>
-rw-r--r--ChangeLog13
-rw-r--r--ChangeLogs/ChangeLog-03a13
-rw-r--r--ace/Service_Object.cpp13
-rw-r--r--ace/Service_Object.h6
-rw-r--r--ace/Service_Repository.cpp12
5 files changed, 40 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 85f3955f901..63a8902a892 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
-Tue Oct 22 16:26:56 2002 Rich Seibel <seibel_r@ociweb.com>
+Wed Oct 23 17:20:18 UTC 2002 Don Hinton <dhinton@ieee.org>
+
+ * ace/Service_Object.{h,cpp} (suspend, resume, fini):
+ Changed return value from void to int so that the
+ return value of the contained ACE_Service_Type could be
+ propagated.
+ * ace/Service_Repository.cpp (suspend, resume, fini):
+ Changed to propagate the return value from the
+ ACE_Service_Type instead of always 0.
+
+Tue Oct 22 16:26:56 2002 Rich Seibel <seibel_r@ociweb.com>
+
* ace/Basic_Types.h:
Added a test for _BYTE_ORDER, same as BYTE_ORDER and
__BYTE_ORDER. VxWorks defines this. Also note, compilers
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 85f3955f901..63a8902a892 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,5 +1,16 @@
-Tue Oct 22 16:26:56 2002 Rich Seibel <seibel_r@ociweb.com>
+Wed Oct 23 17:20:18 UTC 2002 Don Hinton <dhinton@ieee.org>
+
+ * ace/Service_Object.{h,cpp} (suspend, resume, fini):
+ Changed return value from void to int so that the
+ return value of the contained ACE_Service_Type could be
+ propagated.
+ * ace/Service_Repository.cpp (suspend, resume, fini):
+ Changed to propagate the return value from the
+ ACE_Service_Type instead of always 0.
+
+Tue Oct 22 16:26:56 2002 Rich Seibel <seibel_r@ociweb.com>
+
* ace/Basic_Types.h:
Added a test for _BYTE_ORDER, same as BYTE_ORDER and
__BYTE_ORDER. VxWorks defines this. Also note, compilers
diff --git a/ace/Service_Object.cpp b/ace/Service_Object.cpp
index 1a4d931659b..e370e21024f 100644
--- a/ace/Service_Object.cpp
+++ b/ace/Service_Object.cpp
@@ -43,30 +43,31 @@ ACE_Service_Type::~ACE_Service_Type (void)
delete [] (ACE_TCHAR *) this->name_;
}
-void
+int
ACE_Service_Type::fini (void)
{
if (!this->fini_already_called_)
{
- this->type_->fini ();
this->fini_already_called_ = 1;
+ return this->type_->fini ();
}
+ return 0;
}
-void
+int
ACE_Service_Type::suspend (void) const
{
ACE_TRACE ("ACE_Service_Type::suspend");
((ACE_Service_Type *) this)->active_ = 0;
- this->type_->suspend ();
+ return this->type_->suspend ();
}
-void
+int
ACE_Service_Type::resume (void) const
{
ACE_TRACE ("ACE_Service_Type::resume");
((ACE_Service_Type *) this)->active_ = 1;
- this->type_->resume ();
+ return this->type_->resume ();
}
ACE_Service_Object::ACE_Service_Object (ACE_Reactor *r)
diff --git a/ace/Service_Object.h b/ace/Service_Object.h
index 7598e6f8bc5..16cc48518da 100644
--- a/ace/Service_Object.h
+++ b/ace/Service_Object.h
@@ -99,13 +99,13 @@ public:
void type (const ACE_Service_Type_Impl *,
int active = 1);
- void suspend (void) const;
- void resume (void) const;
+ int suspend (void) const;
+ int resume (void) const;
int active (void) const;
void active (int);
/// Calls <fini> on <type_>
- void fini (void);
+ int fini (void);
/// Check if the service has been fini'ed.
int fini_called (void) const;
diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp
index 21e7c47c6e6..f6a1e3ce1f7 100644
--- a/ace/Service_Repository.cpp
+++ b/ace/Service_Repository.cpp
@@ -128,6 +128,7 @@ ACE_Service_Repository::fini (void)
{
ACE_TRACE ("ACE_Service_Repository::fini");
ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
+ int retval = 0;
if (this->service_vector_ != 0)
{
@@ -147,11 +148,12 @@ ACE_Service_Repository::fini (void)
ACE_Service_Type *s =
ACE_const_cast (ACE_Service_Type *,
this->service_vector_[i]);
- s->fini ();
+ // Collect errors.
+ retval += s->fini ();
}
}
- return 0;
+ return (retval == 0) ? 0 : -1;
}
// Close down all the services.
@@ -297,8 +299,7 @@ ACE_Service_Repository::resume (const ACE_TCHAR name[],
if (i == -1)
return -1;
- this->service_vector_[i]->resume ();
- return 0;
+ return this->service_vector_[i]->resume ();
}
// Suspend a service so that it will not be considered active under
@@ -315,8 +316,7 @@ ACE_Service_Repository::suspend (const ACE_TCHAR name[],
if (i == -1)
return -1;
- this->service_vector_[i]->suspend ();
- return 0;
+ return this->service_vector_[i]->suspend ();
}
// Completely remove a <name> entry from the Repository and