diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-22 03:02:56 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-22 03:02:56 +0000 |
commit | 1ef03f54e2cb64c9a1d7a5074638c58f7f45bc72 (patch) | |
tree | d39d9f33f76319ec722ff61eb83e13b8a5a0e90e /examples | |
parent | 116eecbbfabee239998ec55e510953dcd4644cf9 (diff) | |
download | ATCD-1ef03f54e2cb64c9a1d7a5074638c58f7f45bc72.tar.gz |
*** empty log message ***
Diffstat (limited to 'examples')
4 files changed, 17 insertions, 32 deletions
diff --git a/examples/Bounded_Packet_Relay/BPR_Drivers_T.cpp b/examples/Bounded_Packet_Relay/BPR_Drivers_T.cpp index ba441fea6c6..35755941965 100644 --- a/examples/Bounded_Packet_Relay/BPR_Drivers_T.cpp +++ b/examples/Bounded_Packet_Relay/BPR_Drivers_T.cpp @@ -135,9 +135,8 @@ Bounded_Packet_Relay<ACE_SYNCH_USE>::start_transmission (u_long packet_count, "failed to initialize output device object"), -1); } - // Initialize the input device. - if (input_wrapper_->set_input_period (arrival_period) < 0) + else if (input_wrapper_->set_input_period (arrival_period) < 0) { status_ = ERROR_DETECTED; transmission_end_ = ACE_OS::gettimeofday (); @@ -145,7 +144,7 @@ Bounded_Packet_Relay<ACE_SYNCH_USE>::start_transmission (u_long packet_count, "failed to initialize input device object"), -1); } - if (input_wrapper_->set_send_count (packet_count) < 0) + else if (input_wrapper_->set_send_count (packet_count) < 0) { status_ = ERROR_DETECTED; transmission_end_ = ACE_OS::gettimeofday (); @@ -153,9 +152,8 @@ Bounded_Packet_Relay<ACE_SYNCH_USE>::start_transmission (u_long packet_count, "failed to initialize input device object"), -1); } - // Activate the input device. - if (input_wrapper_->activate () < 0) + else if (input_wrapper_->activate () < 0) { status_ = ERROR_DETECTED; transmission_end_ = ACE_OS::gettimeofday (); @@ -210,20 +208,19 @@ Bounded_Packet_Relay<ACE_SYNCH_USE>::end_transmission (Transmission_Status statu // Reactivate the queue, and then clear it. queue_.activate (); while (! queue_.is_empty ()) - { - ACE_Message_Block *msg; - queue_.dequeue_head (msg); - delete msg; - } - - // If all went well, set passed status, stamp end time, - // print a termination message, and return success. + { + ACE_Message_Block *msg; + queue_.dequeue_head (msg); + delete msg; + } + + // If all went well, set passed status, stamp end time, print a + // termination message, and return success. status_ = status; transmission_end_ = ACE_OS::gettimeofday (); ACE_DEBUG ((LM_DEBUG, "\n\nTransmission %u ended with status: %s\n\n", transmission_number_, status_msg ())); - return 0; } @@ -277,7 +274,6 @@ Bounded_Packet_Relay<ACE_SYNCH_USE>::receive_input (void * arg) return 0; } - // Returns string corresponding to current status. template <ACE_SYNCH_DECL> const char * @@ -492,7 +488,6 @@ Bounded_Packet_Relay_Driver<TQ>::read_input (char *buf, size_t bufsiz) return ACE_OS::read (ACE_STDIN, buf, bufsiz); } - // Get count of packets to send in a transmission. template <class TQ> u_long diff --git a/examples/Bounded_Packet_Relay/BPR_Drivers_T.h b/examples/Bounded_Packet_Relay/BPR_Drivers_T.h index e8f85543689..2a4bd2de9db 100644 --- a/examples/Bounded_Packet_Relay/BPR_Drivers_T.h +++ b/examples/Bounded_Packet_Relay/BPR_Drivers_T.h @@ -63,7 +63,6 @@ private: // Method that is going to be invoked. }; - template <ACE_SYNCH_DECL> class Bounded_Packet_Relay : public Bounded_Packet_Relay_Base { @@ -80,7 +79,6 @@ class Bounded_Packet_Relay : public Bounded_Packet_Relay_Base // input to an output device at a pace specified in the start // transmission call. public: - typedef int (Bounded_Packet_Relay<ACE_SYNCH_USE>::*ACTION) (void *); // Command entry point type definition. @@ -154,7 +152,6 @@ private: }; - template <class TQ> class Bounded_Packet_Relay_Driver { @@ -170,7 +167,6 @@ class Bounded_Packet_Relay_Driver // override these methods if there is some logic that is specific // to that implementation. public: - Bounded_Packet_Relay_Driver (void); // Constructor. @@ -265,7 +261,6 @@ protected: // Shut down the driver. private: - u_long packet_count_; // Count of packets to send in a transmission. @@ -280,7 +275,6 @@ private: u_long logging_level_; // Logging level. - }; #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) diff --git a/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp b/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp index 4585f515630..f52d886369b 100644 --- a/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp +++ b/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp @@ -101,16 +101,13 @@ Text_Output_Device_Wrapper::write_output_message (void *message) if (message) { if (logging_) - { - ACE_DEBUG ((LM_DEBUG, "%s", - ACE_static_cast (ACE_Message_Block *, message)-> - rd_ptr ())); - } - - delete ACE_static_cast (ACE_Message_Block *, message); - return 0; + ACE_DEBUG ((LM_DEBUG, "%s", + ACE_static_cast (ACE_Message_Block *, message)-> + rd_ptr ())); + delete ACE_static_cast (ACE_Message_Block *, + message); + return 0; } - ACE_ERROR_RETURN ((LM_ERROR, "Text_Output_Device_Wrapper::" "write_output_message: null argument"), -1); diff --git a/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.h b/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.h index d7c63f0e4c6..44687aab80d 100644 --- a/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.h +++ b/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.h @@ -192,7 +192,6 @@ private: Thread_Bounded_Packet_Relay_Driver &driver_; // The thread timer queue test driver. - }; class BPR_Handler_Base : public ACE_Event_Handler |