diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-06-29 14:41:33 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-06-29 14:41:33 +0000 |
commit | ce7d19470fc5d7dd384fe157a7e6a7b0b08ecc8e (patch) | |
tree | 912c2a8b1ebb810cfe74e769ec754a40795bb3fe | |
parent | 96de322badba1125c530d5be9cbcb4fcd5c6c41d (diff) | |
download | ATCD-ce7d19470fc5d7dd384fe157a7e6a7b0b08ecc8e.tar.gz |
ChangeLogTag:Wed Jun 27 12:00:34 2001 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 19 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 19 | ||||
-rw-r--r-- | TAO/tests/Timeout/client.cpp | 14 | ||||
-rw-r--r-- | THANKS | 2 | ||||
-rw-r--r-- | ace/FIFO_Recv_Msg.i | 35 | ||||
-rw-r--r-- | ace/FIFO_Send_Msg.i | 25 | ||||
-rw-r--r-- | ace/Log_Priority.h | 5 | ||||
-rw-r--r-- | ace/Log_Record.cpp | 32 | ||||
-rw-r--r-- | ace/Log_Record.h | 4 | ||||
-rw-r--r-- | examples/Log_Msg/README | 2 |
11 files changed, 140 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog index ccf4247c2ea..ef021404a56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Wed Jun 27 12:00:34 2001 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> + + * ace/FIFO_Send_Msg.i (send): Make sure that when we use the + putmsg() variant of this call that we correctly return the + length. Thanks to David Trusty <david.trusty@westwave.com> for + reporting this. + + * ace/FIFO_Recv_Msg.i (recv): Make sure that when we use the + getmsg() variant of this call that we correctly return the + length. Thanks to David Trusty <david.trusty@westwave.com> for + reporting this. + + * ace/Log_Record.{h,cpp}: Added support for extending the + names of the types of logging requests. Thanks to Kelly + F. Hickel <kfh@mqsoftware.com> and Jonathan Reis + <reis@stentor.com> for this fix. + Thu Jun 28 13:44:52 2001 Chad Elliott <elliott_c@ociweb.com> * ace/config-sunos5.5.h: @@ -54,7 +71,7 @@ Wed Jun 27 14:07:43 2001 Sharath R. Cholleti <sharath@cs.wustl.edu> Changed write_wstring() and read_wstring() to partially comply with GIOP 1.2. - + Wed Jun 27 07:13:13 2001 Balachandran Natarajan <bala@cs.wustl.edu> * ace/OS_TLI.inl: Fixed a compile error in Win32 builds. diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index ccf4247c2ea..ef021404a56 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,20 @@ +Wed Jun 27 12:00:34 2001 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> + + * ace/FIFO_Send_Msg.i (send): Make sure that when we use the + putmsg() variant of this call that we correctly return the + length. Thanks to David Trusty <david.trusty@westwave.com> for + reporting this. + + * ace/FIFO_Recv_Msg.i (recv): Make sure that when we use the + getmsg() variant of this call that we correctly return the + length. Thanks to David Trusty <david.trusty@westwave.com> for + reporting this. + + * ace/Log_Record.{h,cpp}: Added support for extending the + names of the types of logging requests. Thanks to Kelly + F. Hickel <kfh@mqsoftware.com> and Jonathan Reis + <reis@stentor.com> for this fix. + Thu Jun 28 13:44:52 2001 Chad Elliott <elliott_c@ociweb.com> * ace/config-sunos5.5.h: @@ -54,7 +71,7 @@ Wed Jun 27 14:07:43 2001 Sharath R. Cholleti <sharath@cs.wustl.edu> Changed write_wstring() and read_wstring() to partially comply with GIOP 1.2. - + Wed Jun 27 07:13:13 2001 Balachandran Natarajan <bala@cs.wustl.edu> * ace/OS_TLI.inl: Fixed a compile error in Win32 builds. diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index ccf4247c2ea..ef021404a56 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,20 @@ +Wed Jun 27 12:00:34 2001 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> + + * ace/FIFO_Send_Msg.i (send): Make sure that when we use the + putmsg() variant of this call that we correctly return the + length. Thanks to David Trusty <david.trusty@westwave.com> for + reporting this. + + * ace/FIFO_Recv_Msg.i (recv): Make sure that when we use the + getmsg() variant of this call that we correctly return the + length. Thanks to David Trusty <david.trusty@westwave.com> for + reporting this. + + * ace/Log_Record.{h,cpp}: Added support for extending the + names of the types of logging requests. Thanks to Kelly + F. Hickel <kfh@mqsoftware.com> and Jonathan Reis + <reis@stentor.com> for this fix. + Thu Jun 28 13:44:52 2001 Chad Elliott <elliott_c@ociweb.com> * ace/config-sunos5.5.h: @@ -54,7 +71,7 @@ Wed Jun 27 14:07:43 2001 Sharath R. Cholleti <sharath@cs.wustl.edu> Changed write_wstring() and read_wstring() to partially comply with GIOP 1.2. - + Wed Jun 27 07:13:13 2001 Balachandran Natarajan <bala@cs.wustl.edu> * ace/OS_TLI.inl: Fixed a compile error in Win32 builds. diff --git a/TAO/tests/Timeout/client.cpp b/TAO/tests/Timeout/client.cpp index 11e3f62e6a3..b19f30c2f42 100644 --- a/TAO/tests/Timeout/client.cpp +++ b/TAO/tests/Timeout/client.cpp @@ -74,6 +74,8 @@ send_echo (CORBA::ORB_ptr orb, // Sleep so the server can send the reply... ACE_Time_Value tv (max_timeout / 1000, (max_timeout % 1000) * 1000); + + // This is a non-standard TAO call. orb->run (tv, ACE_TRY_ENV); ACE_TRY_CHECK; } @@ -160,6 +162,7 @@ int main (int argc, char* argv[]) ACE_DEBUG ((LM_DEBUG, "client (%P) testing from %d to %d milliseconds\n", min_timeout, max_timeout)); + for (CORBA::Long t = min_timeout; t != max_timeout; ++t) { //ACE_DEBUG ((LM_DEBUG, @@ -250,13 +253,12 @@ int main (int argc, char* argv[]) ACE_TRY_CHECK; if (timeout_count == 0) - { - ACE_ERROR ((LM_ERROR, "ERROR: No messaged timed out\n")); - } + ACE_ERROR ((LM_ERROR, + "ERROR: No messaged timed out\n")); + if (in_time_count == 0) - { - ACE_ERROR ((LM_ERROR, "ERROR: No messages on time\n")); - } + ACE_ERROR ((LM_ERROR, + "ERROR: No messages on time\n")); ACE_DEBUG ((LM_DEBUG, "In time = %d, timed out = %d\n", in_time_count, timeout_count)); @@ -1272,6 +1272,8 @@ Steffen Hieber <Steffen.Hieber@erl9.siemens.de> Craig L. Ching <cching@mqsoftware.com> Ben Howard <Ben_Howard@raytheon.com> Rich Newman <RNewman@directv.com> +Kelly F. Hickel <kfh@mqsoftware.com> +David Trusty <david.trusty@westwave.com> Burkhard Neppert <b.neppert@dr-staedtler.de> I would particularly like to thank Paul Stephenson, who worked with me diff --git a/ace/FIFO_Recv_Msg.i b/ace/FIFO_Recv_Msg.i index dce1d06e29a..e47c0beef3e 100644 --- a/ace/FIFO_Recv_Msg.i +++ b/ace/FIFO_Recv_Msg.i @@ -13,10 +13,13 @@ ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf &recv_msg) ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); #if defined (ACE_HAS_STREAM_PIPES) int i = 0; - return ACE_OS::getmsg (this->get_handle (), - (strbuf *) 0, - (strbuf *) &recv_msg, - &i); + if (ACE_OS::getmsg (this->get_handle (), + (strbuf *) 0, + (strbuf *) &recv_msg, + &i) == -1) + return -1; + else + return recv_msg.len; #else /* Do the ol' 2-read trick... */ if (ACE_OS::read (this->get_handle (), (char *) &recv_msg.len, @@ -45,10 +48,13 @@ ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf *data, int *flags) { ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); - return ACE_OS::getmsg (this->get_handle (), - (strbuf *) cntl, - (strbuf *) data, - flags); + if (ACE_OS::getmsg (this->get_handle (), + (strbuf *) cntl, + (strbuf *) data, + flags) == -1) + return -1; + else + return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); } ASYS_INLINE ssize_t @@ -58,10 +64,13 @@ ACE_FIFO_Recv_Msg::recv (int *band, int *flags) { ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); - return ACE_OS::getpmsg (this->get_handle (), - (strbuf *) cntl, - (strbuf *) data, - band, - flags); + if (ACE_OS::getpmsg (this->get_handle (), + (strbuf *) cntl, + (strbuf *) data, + band, + flags) == -1) + return -1; + else + return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); } #endif /* ACE_HAS_STREAM_PIPES */ diff --git a/ace/FIFO_Send_Msg.i b/ace/FIFO_Send_Msg.i index e81484983c2..07b7de5e195 100644 --- a/ace/FIFO_Send_Msg.i +++ b/ace/FIFO_Send_Msg.i @@ -19,10 +19,13 @@ ACE_FIFO_Send_Msg::send (const ACE_Str_Buf *data, int flags) { ACE_TRACE ("ACE_FIFO_Send_Msg::send"); - return ACE_OS::putmsg (this->get_handle (), - (strbuf *) cntl, - (strbuf *) data, - flags); + if (ACE_OS::putmsg (this->get_handle (), + (strbuf *) cntl, + (strbuf *) data, + flags) == -1) + return-1; + else + return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); } ASYS_INLINE ssize_t @@ -32,10 +35,14 @@ ACE_FIFO_Send_Msg::send (int band, int flags) { ACE_TRACE ("ACE_FIFO_Send_Msg::send"); - return ACE_OS::putpmsg (this->get_handle (), - (strbuf *) cntl, - (strbuf *) data, - band, - flags); + + if (ACE_OS::putpmsg (this->get_handle (), + (strbuf *) cntl, + (strbuf *) data, + band, + flags) == -1) + return -1; + else + return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); } #endif /* ACE_HAS_STREAM_PIPES */ diff --git a/ace/Log_Priority.h b/ace/Log_Priority.h index e8bd08ce9cd..52c68acb918 100644 --- a/ace/Log_Priority.h +++ b/ace/Log_Priority.h @@ -20,13 +20,12 @@ * * These values are defined using powers of two so that it's * possible to form a mask to turn them on or off dynamically. + * We only use 12 bits, however, so users are free to use the + * remaining 19 bits to define their own priority masks. */ enum ACE_Log_Priority { - // = Note, this first argument *must* start at 1! - // We only use 12 bits, however, so users are free to use the - // remaining bits to define their own priority masks. /// Shutdown the logger (decimal 1). LM_SHUTDOWN = 01, diff --git a/ace/Log_Record.cpp b/ace/Log_Record.cpp index 5e34592fd47..b29d09e8993 100644 --- a/ace/Log_Record.cpp +++ b/ace/Log_Record.cpp @@ -29,7 +29,29 @@ const ACE_TCHAR *ACE_Log_Record::priority_names_[] = ACE_LIB_TEXT ("LM_ERROR"), ACE_LIB_TEXT ("LM_CRITICAL"), ACE_LIB_TEXT ("LM_ALERT"), - ACE_LIB_TEXT ("LM_EMERGENCY")}; + ACE_LIB_TEXT ("LM_EMERGENCY"), + ACE_LIB_TEXT ("LM_UNK(04000)") + ACE_LIB_TEXT ("LM_UNK(010000)") + ACE_LIB_TEXT ("LM_UNK(020000)") + ACE_LIB_TEXT ("LM_UNK(040000)") + ACE_LIB_TEXT ("LM_UNK(0100000)") + ACE_LIB_TEXT ("LM_UNK(0200000)") + ACE_LIB_TEXT ("LM_UNK(0400000)") + ACE_LIB_TEXT ("LM_UNK(01000000)") + ACE_LIB_TEXT ("LM_UNK(02000000)") + ACE_LIB_TEXT ("LM_UNK(04000000)") + ACE_LIB_TEXT ("LM_UNK(010000000)") + ACE_LIB_TEXT ("LM_UNK(020000000)") + ACE_LIB_TEXT ("LM_UNK(040000000)") + ACE_LIB_TEXT ("LM_UNK(0100000000)") + ACE_LIB_TEXT ("LM_UNK(0200000000)") + ACE_LIB_TEXT ("LM_UNK(0400000000)") + ACE_LIB_TEXT ("LM_UNK(01000000000)") + ACE_LIB_TEXT ("LM_UNK(02000000000)") + ACE_LIB_TEXT ("LM_UNK(04000000000)") + ACE_LIB_TEXT ("LM_UNK(010000000000)") + ACE_LIB_TEXT ("LM_UNK(020000000000)") +}; const ACE_TCHAR * ACE_Log_Record::priority_name (ACE_Log_Priority p) @@ -37,6 +59,14 @@ ACE_Log_Record::priority_name (ACE_Log_Priority p) return ACE_Log_Record::priority_names_[ACE::log2 (p)]; } +void +ACE_Log_Record::priority_name (ACE_Log_Priority p, + const ACE_TCHAR *name) +{ + // Name must be a statically allocated string + ACE_Log_Record::priority_names_[ACE::log2 (p)] = name; +} + u_long ACE_Log_Record::priority (void) const { diff --git a/ace/Log_Record.h b/ace/Log_Record.h index 17fdfda3925..131db76d129 100644 --- a/ace/Log_Record.h +++ b/ace/Log_Record.h @@ -103,6 +103,10 @@ public: */ static const ACE_TCHAR *priority_name (ACE_Log_Priority p); + // IMPORTANT: <name> must be a statically allocated const ACE_TCHAR* + static void priority_name (ACE_Log_Priority p, + const ACE_TCHAR *name); + // = Marshall/demarshall /// Encode the <Log_Record> for transmission on the network. void encode (void); diff --git a/examples/Log_Msg/README b/examples/Log_Msg/README index 08e43550c04..047caf9ca77 100644 --- a/examples/Log_Msg/README +++ b/examples/Log_Msg/README @@ -1,5 +1,5 @@ This directory contains program(s) that demonstrate how to use ACE's -Log_Msg class to record various information. +Log_Msg class to record various information. * test_callback.cpp: This program tests the Log_Msg abstraction wrt writing to user defined callback objects. |