diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-11-05 21:58:57 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-11-05 21:58:57 +0000 |
commit | 18f409bb99c9d8ce4e210d9141a07e53a4c0eb3c (patch) | |
tree | cd80dd59f7e7323ecc439775ced868ed4c5c0a9e | |
parent | df5c519c06f4f434d5ce640cdfd520d9d27511ee (diff) | |
download | ATCD-18f409bb99c9d8ce4e210d9141a07e53a4c0eb3c.tar.gz |
ChangeLogTag:Mon Nov 5 10:12:01 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
-rw-r--r-- | ChangeLog | 66 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 66 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 66 | ||||
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 11 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.h | 2 | ||||
-rw-r--r-- | TAO/utils/IOR-parser/ior-handler.cpp | 2 | ||||
-rw-r--r-- | TAO/utils/IOR-parser/ior-handler.h | 6 | ||||
-rw-r--r-- | THANKS | 4 | ||||
-rw-r--r-- | ace/ACE.cpp | 6 | ||||
-rw-r--r-- | ace/Acceptor.cpp | 2 | ||||
-rw-r--r-- | ace/FILE_Addr.cpp | 8 | ||||
-rw-r--r-- | ace/Local_Name_Space_T.cpp | 2 | ||||
-rw-r--r-- | ace/Log_Msg.cpp | 4 | ||||
-rw-r--r-- | ace/Log_Msg_NT_Event_Log.cpp | 2 | ||||
-rw-r--r-- | ace/Log_Msg_NT_Event_Log.h | 2 | ||||
-rw-r--r-- | ace/OS.cpp | 2 | ||||
-rw-r--r-- | ace/Reactor.cpp | 39 | ||||
-rw-r--r-- | ace/Reactor.i | 8 | ||||
-rw-r--r-- | ace/Select_Reactor_Base.cpp | 7 | ||||
-rw-r--r-- | ace/Select_Reactor_T.cpp | 16 | ||||
-rw-r--r-- | ace/config-pharlap.h | 2 |
21 files changed, 269 insertions, 54 deletions
diff --git a/ChangeLog b/ChangeLog index 7e0a851e365..94a3aaaa554 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,62 @@ +Mon Nov 5 10:12:01 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> + + * ace/OS.cpp, + * ace/Local_Name_Space_T.cpp, + * ace/FILE_Addr.cpp, + * ace/Acceptor.cpp, + * ace/ACE.cpp: Changed uses of strncpy() to ACE_OS::strsncpy(). + Thanks to Alain Decamps for these fixes. + +Sun Nov 4 12:11:31 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> + + * ace/Reactor.cpp: Enhanced all the Reactor's event loop methods + to first check and see if the Reactor's been deactivated and to + bailout immediately in this case. Thanks to Don Hinton for + suggesting this. + + * ace/Reactor.i: Moved the reactor_event_loop_done() method from + the *.cpp file into the *.i file and made inlineable. + + * ace/Select_Reactor_T.cpp: Be more careful about error handling in the + dispatch_notification_handlers() method. If a failure occurs, + when dispatch_notifications() is called, return -1, rather than + erroneously "incrementing" the count of the number of handlers + dispatched. Thanks to Don Hinton for reporting this. + +Sat Nov 3 11:15:43 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> + + * The following fixes are from Joachim Achtzehnter <joachima@netacquire.com>: + + In ace/config-pharlap.h we had to explicitly #undef + ACE_HAS_WCHAR after the #include "ace/config-win32.h" + directive. Without this change the resulting DLL depended on + several wide character versions of Win32 system functions, such + as _CreateMutexW. At least some of these dependencies were + caused by ace/OS.i. + + In ace/Log_Msg.cpp we had to add !defined(ACE_HAS_PHARLAP) to a + few more places in addition to the ones Bruce Trask had posted + to avoid reference to the NT Eventlog functionality. + + At the top of ace/Log_Msg_NT_Event_Log.h and + ace/Log_Msg_NT_Event_Log.cpp we added !defined(ACE_HAS_PHARLAP) + to completely bypass the contents of these two files. + + * ace/DEV_Addr.i (addr_to_string): + * ace/Local_Tokens.i (name): + * ace/Module.i (name): + * ace/OS.i (asctime_r): + * ace/SPIPE_Addr.i (addr_to_string): + * ace/UNIX_Addr.i (addr_to_string): + * ace/SString.i (rep): Changed uses of strncpy() to ACE_OS::strsncpy(). + Thanks to Alain Decamps for these fixes. + +Fri Nov 2 14:38:49 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> + + * ace/Task.h (ACE_Task_Base): Clarify the meaning of the put() + hook method. Thanks to Tommy Svensson <tommysvensson@yahoo.com> + for motivating this. + Mon Nov 5 14:23:12 2001 Chad Elliott <elliott_c@ociweb.com> * ace/ACE.cpp: @@ -645,9 +704,10 @@ Wed Oct 10 06:16:52 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> * examples/Reactor/WFMO_Reactor/test_apc.cpp (main): * examples/Reactor/WFMO_Reactor/test_abandoned.cpp (main): Don't use a global Event_Handler since this violates the design rules - for the ACE_Reactor. Thanks to Heping He - <heping.he@riskmetrics.com> for reporting this and to Irfan for - suggesting where the problem arose. + for the ACE_Reactor. Thanks to Heping He + <heping.he@riskmetrics.com> and Hartmut Quast + <HartmutQuast@t-online.de> for reporting this and to Irfan for + suggesting where the problem arose. Tue Oct 9 07:46:20 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 7e0a851e365..94a3aaaa554 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,62 @@ +Mon Nov 5 10:12:01 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> + + * ace/OS.cpp, + * ace/Local_Name_Space_T.cpp, + * ace/FILE_Addr.cpp, + * ace/Acceptor.cpp, + * ace/ACE.cpp: Changed uses of strncpy() to ACE_OS::strsncpy(). + Thanks to Alain Decamps for these fixes. + +Sun Nov 4 12:11:31 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> + + * ace/Reactor.cpp: Enhanced all the Reactor's event loop methods + to first check and see if the Reactor's been deactivated and to + bailout immediately in this case. Thanks to Don Hinton for + suggesting this. + + * ace/Reactor.i: Moved the reactor_event_loop_done() method from + the *.cpp file into the *.i file and made inlineable. + + * ace/Select_Reactor_T.cpp: Be more careful about error handling in the + dispatch_notification_handlers() method. If a failure occurs, + when dispatch_notifications() is called, return -1, rather than + erroneously "incrementing" the count of the number of handlers + dispatched. Thanks to Don Hinton for reporting this. + +Sat Nov 3 11:15:43 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> + + * The following fixes are from Joachim Achtzehnter <joachima@netacquire.com>: + + In ace/config-pharlap.h we had to explicitly #undef + ACE_HAS_WCHAR after the #include "ace/config-win32.h" + directive. Without this change the resulting DLL depended on + several wide character versions of Win32 system functions, such + as _CreateMutexW. At least some of these dependencies were + caused by ace/OS.i. + + In ace/Log_Msg.cpp we had to add !defined(ACE_HAS_PHARLAP) to a + few more places in addition to the ones Bruce Trask had posted + to avoid reference to the NT Eventlog functionality. + + At the top of ace/Log_Msg_NT_Event_Log.h and + ace/Log_Msg_NT_Event_Log.cpp we added !defined(ACE_HAS_PHARLAP) + to completely bypass the contents of these two files. + + * ace/DEV_Addr.i (addr_to_string): + * ace/Local_Tokens.i (name): + * ace/Module.i (name): + * ace/OS.i (asctime_r): + * ace/SPIPE_Addr.i (addr_to_string): + * ace/UNIX_Addr.i (addr_to_string): + * ace/SString.i (rep): Changed uses of strncpy() to ACE_OS::strsncpy(). + Thanks to Alain Decamps for these fixes. + +Fri Nov 2 14:38:49 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> + + * ace/Task.h (ACE_Task_Base): Clarify the meaning of the put() + hook method. Thanks to Tommy Svensson <tommysvensson@yahoo.com> + for motivating this. + Mon Nov 5 14:23:12 2001 Chad Elliott <elliott_c@ociweb.com> * ace/ACE.cpp: @@ -645,9 +704,10 @@ Wed Oct 10 06:16:52 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> * examples/Reactor/WFMO_Reactor/test_apc.cpp (main): * examples/Reactor/WFMO_Reactor/test_abandoned.cpp (main): Don't use a global Event_Handler since this violates the design rules - for the ACE_Reactor. Thanks to Heping He - <heping.he@riskmetrics.com> for reporting this and to Irfan for - suggesting where the problem arose. + for the ACE_Reactor. Thanks to Heping He + <heping.he@riskmetrics.com> and Hartmut Quast + <HartmutQuast@t-online.de> for reporting this and to Irfan for + suggesting where the problem arose. Tue Oct 9 07:46:20 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 7e0a851e365..94a3aaaa554 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,62 @@ +Mon Nov 5 10:12:01 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> + + * ace/OS.cpp, + * ace/Local_Name_Space_T.cpp, + * ace/FILE_Addr.cpp, + * ace/Acceptor.cpp, + * ace/ACE.cpp: Changed uses of strncpy() to ACE_OS::strsncpy(). + Thanks to Alain Decamps for these fixes. + +Sun Nov 4 12:11:31 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> + + * ace/Reactor.cpp: Enhanced all the Reactor's event loop methods + to first check and see if the Reactor's been deactivated and to + bailout immediately in this case. Thanks to Don Hinton for + suggesting this. + + * ace/Reactor.i: Moved the reactor_event_loop_done() method from + the *.cpp file into the *.i file and made inlineable. + + * ace/Select_Reactor_T.cpp: Be more careful about error handling in the + dispatch_notification_handlers() method. If a failure occurs, + when dispatch_notifications() is called, return -1, rather than + erroneously "incrementing" the count of the number of handlers + dispatched. Thanks to Don Hinton for reporting this. + +Sat Nov 3 11:15:43 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> + + * The following fixes are from Joachim Achtzehnter <joachima@netacquire.com>: + + In ace/config-pharlap.h we had to explicitly #undef + ACE_HAS_WCHAR after the #include "ace/config-win32.h" + directive. Without this change the resulting DLL depended on + several wide character versions of Win32 system functions, such + as _CreateMutexW. At least some of these dependencies were + caused by ace/OS.i. + + In ace/Log_Msg.cpp we had to add !defined(ACE_HAS_PHARLAP) to a + few more places in addition to the ones Bruce Trask had posted + to avoid reference to the NT Eventlog functionality. + + At the top of ace/Log_Msg_NT_Event_Log.h and + ace/Log_Msg_NT_Event_Log.cpp we added !defined(ACE_HAS_PHARLAP) + to completely bypass the contents of these two files. + + * ace/DEV_Addr.i (addr_to_string): + * ace/Local_Tokens.i (name): + * ace/Module.i (name): + * ace/OS.i (asctime_r): + * ace/SPIPE_Addr.i (addr_to_string): + * ace/UNIX_Addr.i (addr_to_string): + * ace/SString.i (rep): Changed uses of strncpy() to ACE_OS::strsncpy(). + Thanks to Alain Decamps for these fixes. + +Fri Nov 2 14:38:49 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> + + * ace/Task.h (ACE_Task_Base): Clarify the meaning of the put() + hook method. Thanks to Tommy Svensson <tommysvensson@yahoo.com> + for motivating this. + Mon Nov 5 14:23:12 2001 Chad Elliott <elliott_c@ociweb.com> * ace/ACE.cpp: @@ -645,9 +704,10 @@ Wed Oct 10 06:16:52 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> * examples/Reactor/WFMO_Reactor/test_apc.cpp (main): * examples/Reactor/WFMO_Reactor/test_abandoned.cpp (main): Don't use a global Event_Handler since this violates the design rules - for the ACE_Reactor. Thanks to Heping He - <heping.he@riskmetrics.com> for reporting this and to Irfan for - suggesting where the problem arose. + for the ACE_Reactor. Thanks to Heping He + <heping.he@riskmetrics.com> and Hartmut Quast + <HartmutQuast@t-online.de> for reporting this and to Irfan for + suggesting where the problem arose. Tue Oct 9 07:46:20 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 25803fbd60e..3665ba074fd 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,14 @@ +Mon Nov 5 06:51:16 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> + + * utils/IOR-parser/ior-handler.{h,cpp}: Changed struct IOR to + IOR_Manager to avoid clashes with macros named IOR on HP/UX. + Thanks to Steve Osselton <steve@prismtechnologies.com> for + reporting this. + + * orbsvcs/orbsvcs/Concurrency/CC_LockSet.h: #undef the lock_held + macro to work around clashing macros on HP/UX. Thanks to Steve + Osselton <steve@prismtechnologies.com> for reporting this. + Mon Nov 5 13:53:21 2001 Chad Elliott <elliott_c@ociweb.com> * TAO_IDL/include/idl_defines.h: diff --git a/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.h b/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.h index a92718ae441..6264be36c1d 100644 --- a/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.h +++ b/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.h @@ -47,7 +47,7 @@ #include "concurrency_export.h" #if defined (lock_held) -# undef lock_held +#undef lock_held #endif /* lock_held */ #define NUMBER_OF_LOCK_MODES 5 diff --git a/TAO/utils/IOR-parser/ior-handler.cpp b/TAO/utils/IOR-parser/ior-handler.cpp index f8992163db3..59fcc361322 100644 --- a/TAO/utils/IOR-parser/ior-handler.cpp +++ b/TAO/utils/IOR-parser/ior-handler.cpp @@ -225,7 +225,7 @@ IorHandler::getString (char *readPtr, int givenLen) } void -IorHandler::interpretIor (char *thisIor, struct IOR *thisIorInfo) +IorHandler::interpretIor (char *thisIor, struct IOR_Manager *thisIorInfo) { int numCharsToSkip; int validTypeId = 0; diff --git a/TAO/utils/IOR-parser/ior-handler.h b/TAO/utils/IOR-parser/ior-handler.h index 94865a0d337..3b88e60c109 100644 --- a/TAO/utils/IOR-parser/ior-handler.h +++ b/TAO/utils/IOR-parser/ior-handler.h @@ -35,7 +35,7 @@ #define MAX_OBJ_KEY_LEN 100 #define MAX_HOSTNAME_LEN 64 -struct IOR +struct IOR_Manager { // = TITLE // This is the useful information obtained from parsing an IOR. @@ -87,7 +87,7 @@ public: IorHandler (void); // Constructor - void interpretIor (char *thisIor, struct IOR *thisIorInfo); + void interpretIor (char *thisIor, struct IOR_Manager *thisIorInfo); // The main IOR parsing routine char *getIdlInterface (char *typeId, int *validTypeId); @@ -99,7 +99,7 @@ public: char stringIOR[MAX_IOR_LEN]; // Holds the stringified IOR during parsing - struct IOR parsedIOR; + struct IOR_Manager parsedIOR; // Holds the parsed IOR private: @@ -1007,7 +1007,7 @@ Michael Ravits <miquel@bitsmart.com> Derek Viljoen <derek@viljoen.com> Hamed Azizadah <Azizadah@ix.netcom.com> Keo Kelly <kkelly@fallschurch.esys.com> -Joachim Achtzehnter <joachima@realtimeint.com> +Joachim Achtzehnter <joachima@netacquire.com> Tomer Amiaz <Tomer@bandwiz.com> Sergey Osokin <osa@freebsd.org.ru> Nick Logvinov <nl@rpb.ru> @@ -1359,7 +1359,9 @@ Steve Osselton <steve@prismtechnologies.com> Doron Rajwan <doron@BANDWIZ.COM> Stuart Jones <sjones@clcsmail.ksc.nasa.gov> Guillaume Renaud <guillaume.renaud@valtech.fr> +Tommy Svensson <tommysvensson@yahoo.com> Jstwo <jstwo@writeme.com> +Hartmut Quast <HartmutQuast@t-online.de> I would particularly like to thank Paul Stephenson, who worked with me at Ericsson in the early 1990's. Paul devised the recursive Makefile diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 784ca50876f..c8de70ad12f 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -2599,9 +2599,9 @@ ACE::timestamp (ACE_TCHAR date_and_time[], timebuf, sizeof timebuf); // date_and_timelen > sizeof timebuf! - ACE_OS::strncpy (date_and_time, - timebuf, - date_and_timelen); + ACE_OS::strsncpy (date_and_time, + timebuf, + date_and_timelen); char yeartmp[5]; ACE_OS::strsncpy (yeartmp, &date_and_time[20], diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp index 8e65d2bce0b..1e279feef43 100644 --- a/ace/Acceptor.cpp +++ b/ace/Acceptor.cpp @@ -176,7 +176,7 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ACE_TCHAR **strp, if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) return -1; else - ACE_OS::strncpy (*strp, buf, length); + ACE_OS::strsncpy (*strp, buf, length); return ACE_OS::strlen (buf); } diff --git a/ace/FILE_Addr.cpp b/ace/FILE_Addr.cpp index aa7a00bc908..cc7c47743ec 100644 --- a/ace/FILE_Addr.cpp +++ b/ace/FILE_Addr.cpp @@ -48,9 +48,9 @@ ACE_FILE_Addr::set (const ACE_FILE_Addr &sa) } else { - (void) ACE_OS::strncpy (this->filename_, - sa.filename_, - sa.get_size ()); + (void) ACE_OS::strsncpy (this->filename_, + sa.filename_, + sa.get_size ()); this->base_set (sa.get_type (), sa.get_size ()); @@ -95,7 +95,7 @@ ACE_FILE_Addr::ACE_FILE_Addr (const ACE_TCHAR *filename) int ACE_FILE_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const { - ACE_OS::strncpy (s, this->filename_, len); + ACE_OS::strsncpy (s, this->filename_, len); return 0; } diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp index ff0a86fd6d3..09bd0a74d6f 100644 --- a/ace/Local_Name_Space_T.cpp +++ b/ace/Local_Name_Space_T.cpp @@ -318,7 +318,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::resolve_i (const ACE_WString &na char [len + 1], -1); - ACE_OS::strncpy (new_type, temp, len); + ACE_OS::strsncpy (new_type, temp, len); new_type[len] = '\0'; // Null terminate the string type = new_type; return 0; diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index 8b2ba82dfc5..cfee50865ce 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -39,7 +39,7 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Log_Msg) # endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */ #endif /* ACE_MT_SAFE */ -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) # define ACE_LOG_MSG_SYSLOG_BACKEND ACE_Log_Msg_NT_Event_Log #elif !defined (ACE_LACKS_UNIX_SYSLOG) && !defined (ACE_HAS_WINCE) # define ACE_LOG_MSG_SYSLOG_BACKEND ACE_Log_Msg_UNIX_Syslog @@ -129,12 +129,14 @@ int ACE_Log_Msg_Manager::init_backend (const u_long *flags) { ACE_NO_HEAP_CHECK; +#if defined (WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) // Allocate the ACE_Log_Msg_Backend instance. if (ACE_BIT_ENABLED (ACE_Log_Msg_Manager::log_backend_flags_, ACE_Log_Msg::SYSLOG)) ACE_NEW_RETURN (ACE_Log_Msg_Manager::log_backend_, ACE_LOG_MSG_SYSLOG_BACKEND, -1); else +#endif /* defined (WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) */ ACE_NEW_RETURN (ACE_Log_Msg_Manager::log_backend_, ACE_Log_Msg_IPC, -1); diff --git a/ace/Log_Msg_NT_Event_Log.cpp b/ace/Log_Msg_NT_Event_Log.cpp index 663465bfe23..71502ec2092 100644 --- a/ace/Log_Msg_NT_Event_Log.cpp +++ b/ace/Log_Msg_NT_Event_Log.cpp @@ -2,7 +2,7 @@ #include "ace/config-all.h" -#if defined (ACE_WIN32) +#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) #include "ace/Log_Msg_NT_Event_Log.h" #include "ace/Log_Msg.h" diff --git a/ace/Log_Msg_NT_Event_Log.h b/ace/Log_Msg_NT_Event_Log.h index fe33a54ab28..75bbb4839d7 100644 --- a/ace/Log_Msg_NT_Event_Log.h +++ b/ace/Log_Msg_NT_Event_Log.h @@ -20,7 +20,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) #include "ace/Log_Msg_Backend.h" diff --git a/ace/OS.cpp b/ace/OS.cpp index 839d1b01d43..8ab64de0f8e 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -3607,7 +3607,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func, // pStackBase, but is that of the current task? If so, it // might be a bit quicker than this extraction of the tcb // . . . - ACE_OS::strncpy (*thr_id + 1, ::taskTcb (tid)->name, 10); + ACE_OS::strsncpy (*thr_id + 1, ::taskTcb (tid)->name, 10); else // *thr_id was not allocated by the Thread_Manager. // Pass back the task name in the location pointed to diff --git a/ace/Reactor.cpp b/ace/Reactor.cpp index df535e187a5..bec21419751 100644 --- a/ace/Reactor.cpp +++ b/ace/Reactor.cpp @@ -144,6 +144,9 @@ ACE_Reactor::run_reactor_event_loop (REACTOR_EVENT_HOOK eh) { ACE_TRACE ("ACE_Reactor::run_reactor_event_loop"); + if (this->reactor_event_loop_done ()) + return 0; + while (1) { int result = this->implementation_->handle_events (); @@ -164,6 +167,9 @@ ACE_Reactor::run_alertable_reactor_event_loop (REACTOR_EVENT_HOOK eh) { ACE_TRACE ("ACE_Reactor::run_alertable_reactor_event_loop"); + if (this->reactor_event_loop_done ()) + return 0; + while (1) { int result = this->implementation_->alertable_handle_events (); @@ -185,11 +191,14 @@ ACE_Reactor::run_reactor_event_loop (ACE_Time_Value &tv, { ACE_TRACE ("ACE_Reactor::run_reactor_event_loop"); + if (this->reactor_event_loop_done ()) + return 0; + while (1) { int result = this->implementation_->handle_events (tv); - if (eh != 0 && (*eh)(0)) + if (eh != 0 && (*eh) (0)) continue; else if (result == -1) { @@ -199,15 +208,15 @@ ACE_Reactor::run_reactor_event_loop (ACE_Time_Value &tv, } else if (result == 0) { - // handle_events timed out without dispatching anything. - // Because of rounding and conversion errors and such, it could - // be that the wait loop (WFMO, select, etc.) timed out, but - // the timer queue said it wasn't quite ready to expire a - // timer. In this case, the ACE_Time_Value we passed into - // handle_events won't have quite been reduced to 0, and we - // need to go around again. If we are all the way to 0, just - // return, as the entire time the caller wanted to wait has been - // used up. + // The <handle_events> method timed out without dispatching + // anything. Because of rounding and conversion errors and + // such, it could be that the wait loop (WFMO, select, etc.) + // timed out, but the timer queue said it wasn't quite ready + // to expire a timer. In this case, the ACE_Time_Value we + // passed into handle_events won't have quite been reduced + // to 0, and we need to go around again. If we are all the + // way to 0, just return, as the entire time the caller + // wanted to wait has been used up. if (tv.usec () > 0) continue; return 0; @@ -224,6 +233,9 @@ ACE_Reactor::run_alertable_reactor_event_loop (ACE_Time_Value &tv, { ACE_TRACE ("ACE_Reactor::run_alertable_reactor_event_loop"); + if (this->reactor_event_loop_done ()) + return 0; + for (;;) { int result = this->implementation_->alertable_handle_events (tv); @@ -249,13 +261,6 @@ ACE_Reactor::end_reactor_event_loop (void) return 0; } -int -ACE_Reactor::reactor_event_loop_done (void) -{ - ACE_TRACE ("ACE_Reactor::reactor_event_loop_done"); - return this->implementation_->deactivated (); -} - void ACE_Reactor::reset_reactor_event_loop (void) { diff --git a/ace/Reactor.i b/ace/Reactor.i index 6dc267d046a..912c529d10c 100644 --- a/ace/Reactor.i +++ b/ace/Reactor.i @@ -656,3 +656,11 @@ ACE_Reactor::uses_event_associations (void) { return this->implementation ()->uses_event_associations (); } + +ACE_INLINE int +ACE_Reactor::reactor_event_loop_done (void) +{ + ACE_TRACE ("ACE_Reactor::reactor_event_loop_done"); + return this->implementation_->deactivated (); +} + diff --git a/ace/Select_Reactor_Base.cpp b/ace/Select_Reactor_Base.cpp index e5bb878b30f..eb129a75073 100644 --- a/ace/Select_Reactor_Base.cpp +++ b/ace/Select_Reactor_Base.cpp @@ -944,9 +944,9 @@ ACE_Select_Reactor_Notify::read_notify_pipe (ACE_HANDLE handle, { ACE_TRACE ("ACE_Select_Reactor_Notify::read_notify_pipe"); - ssize_t n = 0; + ssize_t n = ACE::recv (handle, (char *) &buffer, sizeof buffer); - if ((n = ACE::recv (handle, (char *) &buffer, sizeof buffer)) > 0) + if (n > 0) { // Check to see if we've got a short read. if (n != sizeof buffer) @@ -986,8 +986,7 @@ ACE_Select_Reactor_Notify::handle_input (ACE_HANDLE handle) int result = 0; ACE_Notification_Buffer buffer; - while ((result = this->read_notify_pipe (handle, - buffer)) > 0) + while ((result = this->read_notify_pipe (handle, buffer)) > 0) { // Dispatch the buffer // NOTE: We count only if we made any dispatches ie. upcalls. diff --git a/ace/Select_Reactor_T.cpp b/ace/Select_Reactor_T.cpp index c4182986d43..030397747b4 100644 --- a/ace/Select_Reactor_T.cpp +++ b/ace/Select_Reactor_T.cpp @@ -1054,9 +1054,13 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch_notification_handlers // enabled. We'll handle all these threads and notifications, and // then break out to continue the event loop. - number_of_handlers_dispatched += - this->notify_handler_->dispatch_notifications (number_of_active_handles, - dispatch_set.rd_mask_); + int n = this->notify_handler_->dispatch_notifications (number_of_active_handles, + dispatch_set.rd_mask_); + if (n == -1) + return -1; + else + number_of_handlers_dispatched += n; + return this->state_changed_ ? -1 : 0; } @@ -1219,7 +1223,9 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch (dispatch_set, active_handle_count, other_handlers_dispatched) == -1) - break; // State has changed, exit loop. + // State has changed or a serious failure has occured, so exit + // loop. + break; // Finally, dispatch the I/O handlers. else if (this->dispatch_io_handlers @@ -1231,7 +1237,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch } while (active_handle_count > 0); - return io_handlers_dispatched + other_handlers_dispatched+signal_occurred; + return io_handlers_dispatched + other_handlers_dispatched + signal_occurred; } template <class ACE_SELECT_REACTOR_TOKEN> int diff --git a/ace/config-pharlap.h b/ace/config-pharlap.h index 374bed01b49..51433b4fe77 100644 --- a/ace/config-pharlap.h +++ b/ace/config-pharlap.h @@ -49,6 +49,8 @@ // Let the config-win32.h file do its thing #undef ACE_CONFIG_H #include "ace/config-win32.h" +#undef ACE_HAS_WCHAR + #include /**/ <embkern.h> #if defined (ACE_HAS_PHARLAP_RT) # include /**/ <embtcpip.h> |