From 7a4137a178557f0da9db0fc078c848e77a09e1cd Mon Sep 17 00:00:00 2001 From: bala Date: Fri, 16 Jul 1999 03:43:26 +0000 Subject: Fixed warnings in EGCS --- TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp | 67 ++++++------- TAO/orbsvcs/orbsvcs/AV/MCast.cpp | 61 +++++++----- TAO/orbsvcs/orbsvcs/AV/MCast.h | 6 +- TAO/orbsvcs/orbsvcs/AV/Nil.cpp | 32 ++++-- TAO/orbsvcs/orbsvcs/AV/Nil.h | 9 ++ TAO/orbsvcs/orbsvcs/AV/Policy.cpp | 58 ++--------- TAO/orbsvcs/orbsvcs/AV/Policy.h | 8 +- TAO/orbsvcs/orbsvcs/AV/RTP.cpp | 14 +-- TAO/orbsvcs/orbsvcs/AV/RTP.h | 21 ++-- TAO/orbsvcs/orbsvcs/AV/Transport.cpp | 20 ++-- TAO/orbsvcs/orbsvcs/AV/sfp.cpp | 137 +++++++++++++------------- TAO/orbsvcs/orbsvcs/AV/sfp.h | 4 + TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp | 8 +- 13 files changed, 223 insertions(+), 222 deletions(-) diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp index 18edc996049..971482fd34d 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp @@ -259,7 +259,7 @@ TAO_Basic_StreamCtrl::modify_QoS (AVStreams::streamQoS & new_qos, // Used by StreamEndPoint and VDev to inform StreamCtrl of events. // E.g., loss of flow, reestablishment of flow, etc.. void -TAO_Basic_StreamCtrl::push_event (const struct CosPropertyService::Property &the_event, +TAO_Basic_StreamCtrl::push_event (const struct CosPropertyService::Property &/*the_event*/, CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { @@ -1263,7 +1263,7 @@ TAO_MCastConfigIf::configure (const CosPropertyService::Property & a_configurati void TAO_MCastConfigIf::set_initial_configuration (const CosPropertyService::Properties &initial, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Environment &/*ACE_TRY_ENV*/) ACE_THROW_SPEC ((CORBA::SystemException)) { this->initial_configuration_ = initial; @@ -1370,22 +1370,22 @@ TAO_Base_StreamEndPoint::handle_open (void) } int -TAO_Base_StreamEndPoint::handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) +TAO_Base_StreamEndPoint::handle_stop (const AVStreams::flowSpec &, + CORBA::Environment &) { return 0; } int -TAO_Base_StreamEndPoint::handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) +TAO_Base_StreamEndPoint::handle_start (const AVStreams::flowSpec &, + CORBA::Environment &) { return 0; } int -TAO_Base_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) +TAO_Base_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &, + CORBA::Environment &) { return 0; } @@ -1413,15 +1413,15 @@ TAO_Base_StreamEndPoint::handle_connection_requested (AVStreams::flowSpec &, } int -TAO_Base_StreamEndPoint::set_protocol_object (const char *flowname, - TAO_AV_Protocol_Object *sfp_object) +TAO_Base_StreamEndPoint::set_protocol_object (const char */*flowname*/, + TAO_AV_Protocol_Object * /*sfp_object*/) { return -1; } int -TAO_Base_StreamEndPoint::get_callback (const char *flowname, - TAO_AV_Callback *&sfp_callback) +TAO_Base_StreamEndPoint::get_callback (const char */*flowname*/, + TAO_AV_Callback *&/*sfp_callback*/) { return -1; } @@ -1662,9 +1662,9 @@ TAO_StreamEndPoint::destroy (const AVStreams::flowSpec &/* the_spec */, // Called by our peer endpoint, requesting us to establish // a connection CORBA::Boolean -TAO_StreamEndPoint::request_connection (AVStreams::StreamEndPoint_ptr initiator, +TAO_StreamEndPoint::request_connection (AVStreams::StreamEndPoint_ptr /*initiator*/, CORBA::Boolean is_mcast, - AVStreams::streamQoS &qos, + AVStreams::streamQoS &/*qos*/, AVStreams::flowSpec &flow_spec, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException, @@ -1770,10 +1770,10 @@ TAO_StreamEndPoint::disconnect (const AVStreams::flowSpec &the_spec, // Sets the status of the flow protocol. void -TAO_StreamEndPoint::set_FPStatus (const AVStreams::flowSpec &the_spec, +TAO_StreamEndPoint::set_FPStatus (const AVStreams::flowSpec &/*the_spec*/, const char *fp_name, const CORBA::Any &fp_settings, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Environment &/*ACE_TRY_ENV*/) ACE_THROW_SPEC ((CORBA::SystemException, AVStreams::noSuchFlow, AVStreams::FPError)) @@ -1972,9 +1972,9 @@ TAO_StreamEndPoint::set_source_id (CORBA::Long source_id, } CORBA::Boolean -TAO_StreamEndPoint::multiconnect (AVStreams::streamQoS &the_qos, - AVStreams::flowSpec &flow_spec, - CORBA::Environment &ACE_TRY_ENV) +TAO_StreamEndPoint::multiconnect (AVStreams::streamQoS &/*the_qos*/, + AVStreams::flowSpec &/*flow_spec*/, + CORBA::Environment &/*ACE_TRY_ENV*/) { return 0; } @@ -2550,7 +2550,8 @@ TAO_MMDevice::TAO_MMDevice (TAO_AV_Endpoint_Strategy *endpoint_strategy) { } -TAO_MMDevice::TAO_MMDevice (TAO_MMDevice const &) +TAO_MMDevice::TAO_MMDevice (TAO_MMDevice const &mm_device) + :TAO_PropertySet (mm_device) { //no-op } @@ -2622,7 +2623,7 @@ TAO_MMDevice::create_A_B (MMDevice_Type type, AVStreams::VDev_out the_vdev, AVStreams::streamQoS &the_qos, CORBA::Boolean_out met_qos, - char *&named_vdev, + char *&/*named_vdev*/, const AVStreams::flowSpec &flow_spec, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException, @@ -2865,7 +2866,7 @@ TAO_MMDevice::create_B (AVStreams::StreamCtrl_ptr streamctrl, void TAO_MMDevice::destroy (AVStreams::StreamEndPoint_ptr /* the_ep */, const char * /* vdev_name */, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Environment &/*ACE_TRY_ENV*/) ACE_THROW_SPEC ((CORBA::SystemException, AVStreams::notSupported)) { @@ -3562,21 +3563,21 @@ TAO_FlowEndPoint::unlock (CORBA::Environment &ACE_TRY_ENV) // The start,stop and destroy are to be handled by the application. void -TAO_FlowEndPoint::stop (CORBA::Environment &ACE_TRY_ENV) +TAO_FlowEndPoint::stop (CORBA::Environment &/*ACE_TRY_ENV*/) ACE_THROW_SPEC ((CORBA::SystemException)) { this->protocol_object_->stop (); } void -TAO_FlowEndPoint::start (CORBA::Environment &ACE_TRY_ENV) +TAO_FlowEndPoint::start (CORBA::Environment &/*ACE_TRY_ENV*/) ACE_THROW_SPEC ((CORBA::SystemException)) { this->protocol_object_->start (); } void -TAO_FlowEndPoint::destroy (CORBA::Environment &ACE_TRY_ENV) +TAO_FlowEndPoint::destroy (CORBA::Environment &/*ACE_TRY_ENV*/) ACE_THROW_SPEC ((CORBA::SystemException)) { int result = deactivate_servant (this); @@ -3849,7 +3850,7 @@ TAO_FlowEndPoint::set_Mcast_peer (AVStreams::FlowConnection_ptr /* the_fc */, } char * -TAO_FlowEndPoint::go_to_listen (AVStreams::QoS & the_qos, +TAO_FlowEndPoint::go_to_listen (AVStreams::QoS & /*the_qos*/, CORBA::Boolean is_mcast, AVStreams::FlowProducer_ptr peer_fep, char *& flowProtocol, @@ -3931,10 +3932,10 @@ TAO_FlowEndPoint::go_to_listen (AVStreams::QoS & the_qos, CORBA::Boolean -TAO_FlowEndPoint::connect_to_peer (AVStreams::QoS & the_qos, +TAO_FlowEndPoint::connect_to_peer (AVStreams::QoS & /*the_qos*/, const char * address, - const char * use_flow_protocol, - CORBA::Environment &ACE_TRY_ENV) + const char * /*use_flow_protocol*/, + CORBA::Environment &/*ACE_TRY_ENV*/) ACE_THROW_SPEC ((CORBA::SystemException, AVStreams::failedToConnect, AVStreams::FPError, @@ -3960,7 +3961,7 @@ TAO_FlowEndPoint::connect_to_peer (AVStreams::QoS & the_qos, } int -TAO_FlowEndPoint::set_protocol_object (const char *flowname, +TAO_FlowEndPoint::set_protocol_object (const char */*flowname*/, TAO_AV_Protocol_Object *object) { ACE_DEBUG ((LM_DEBUG,"TAO_FlowEndPoint::set_protocol_object\n")); @@ -3990,7 +3991,7 @@ TAO_FlowProducer::connect_mcast (AVStreams::QoS & /* the_qos */, CORBA::Boolean_out /* is_met */, const char *address, const char * use_flow_protocol, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Environment &/*ACE_TRY_ENV*/) ACE_THROW_SPEC ((CORBA::SystemException, AVStreams::failedToConnect, AVStreams::notSupported, @@ -4252,7 +4253,7 @@ TAO_FDev::bind_mcast (AVStreams::FDev_ptr first_peer, void TAO_FDev::destroy (AVStreams::FlowEndPoint_ptr /* the_ep */, const char * /* fdev_name */, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Environment &/*ACE_TRY_ENV*/) ACE_THROW_SPEC ((CORBA::SystemException, AVStreams::notSupported)) { @@ -5014,7 +5015,7 @@ TAO_AV_QoS::get_flow_qos (const char *flowname,AVStreams::QoS &flow_qos) } int -TAO_AV_QoS::convert (AVStreams::streamQoS &network_qos) +TAO_AV_QoS::convert (AVStreams::streamQoS &/*network_qos*/) { return -1; } diff --git a/TAO/orbsvcs/orbsvcs/AV/MCast.cpp b/TAO/orbsvcs/orbsvcs/AV/MCast.cpp index 4c3fbfa1a28..1e0db01c9ff 100644 --- a/TAO/orbsvcs/orbsvcs/AV/MCast.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/MCast.cpp @@ -66,9 +66,9 @@ TAO_AV_UDP_MCast_Acceptor::open (TAO_Base_StreamEndPoint *endpoint, } int -TAO_AV_UDP_MCast_Acceptor::open_default (TAO_Base_StreamEndPoint *endpoint, - TAO_AV_Core *av_core, - TAO_FlowSpec_Entry *entry) +TAO_AV_UDP_MCast_Acceptor::open_default (TAO_Base_StreamEndPoint */*endpoint*/, + TAO_AV_Core */*av_core*/, + TAO_FlowSpec_Entry */*entry*/) { ACE_DEBUG ((LM_DEBUG,"TAO_AV_UDP_MCast_Acceptor::open_default\n")); return 0; @@ -78,7 +78,7 @@ int TAO_AV_UDP_MCast_Acceptor::activate_svc_handler (TAO_AV_UDP_MCast_Flow_Handler *handler) { ACE_Event_Handler *event_handler = handler; - ACE_HANDLE fd = event_handler->get_handle (); + // ACE_HANDLE fd = event_handler->get_handle (); int result = this->av_core_->reactor ()->register_handler (event_handler, ACE_Event_Handler::READ_MASK); if (result < 0) @@ -164,7 +164,7 @@ int TAO_AV_UDP_MCast_Connector::activate_svc_handler (TAO_AV_UDP_MCast_Flow_Handler *handler) { ACE_Event_Handler *event_handler = handler; - ACE_HANDLE fd = event_handler->get_handle (); + // ACE_HANDLE fd = event_handler->get_handle (); int result = this->av_core_->reactor ()->register_handler (event_handler, ACE_Event_Handler::READ_MASK); if (result < 0) @@ -198,15 +198,9 @@ TAO_AV_UDP_MCast_Flow_Handler::~TAO_AV_UDP_MCast_Flow_Handler (void) delete this->dgram_mcast_; } -ACE_HANDLE -TAO_AV_UDP_MCast_Flow_Handler::get_handle (void) const -{ - ACE_DEBUG ((LM_DEBUG,"TAO_AV_UDP_MCast_Flow_Handler::get_handle ")); - return this->get_mcast_socket ()->get_handle () ; -} int -TAO_AV_UDP_MCast_Flow_Handler::handle_input (ACE_HANDLE fd) +TAO_AV_UDP_MCast_Flow_Handler::handle_input (ACE_HANDLE /*fd*/) { size_t size = 2*this->transport_->mtu (); ACE_Message_Block *frame = 0; @@ -224,10 +218,11 @@ TAO_AV_UDP_MCast_Flow_Handler::handle_input (ACE_HANDLE fd) return 0; } -ACE_SOCK_Dgram_Mcast * -TAO_AV_UDP_MCast_Flow_Handler::get_mcast_socket (void) const +ACE_INLINE ACE_HANDLE +TAO_AV_UDP_MCast_Flow_Handler::get_handle (void) const { - return this->dgram_mcast_; + ACE_DEBUG ((LM_DEBUG,"TAO_AV_UDP_MCast_Flow_Handler::get_handle ")); + return this->get_mcast_socket ()->get_handle () ; } @@ -250,7 +245,7 @@ TAO_AV_UDP_MCast_Transport::~TAO_AV_UDP_MCast_Transport (void) } int -TAO_AV_UDP_MCast_Transport::open (ACE_Addr *address) +TAO_AV_UDP_MCast_Transport::open (ACE_Addr */*address*/) { return 0; } @@ -261,14 +256,9 @@ TAO_AV_UDP_MCast_Transport::close (void) return 0; } -int -TAO_AV_UDP_MCast_Transport::mtu (void) -{ - return ACE_MAX_DGRAM_SIZE; -} int -TAO_AV_UDP_MCast_Transport::get_peer_addr (ACE_Addr &addr) +TAO_AV_UDP_MCast_Transport::get_peer_addr (ACE_Addr &/*addr*/) { return -1; } @@ -353,7 +343,25 @@ TAO_AV_UDP_MCast_Transport::send (const iovec *iov, } -ssize_t +ACE_INLINE int +TAO_AV_UDP_MCast_Transport::mtu (void) +{ + return ACE_MAX_DGRAM_SIZE; +} + + +//ACE_INLINE ssize_t +//TAO_AV_UDP_MCast_Transport::send (const iovec *iov, +// int iovcnt, +// ACE_Time_Value *) +//{ +// return this->handler_->get_mcast_socket ()->send (iov, +// iovcnt, +// 0); +// +//} +// +ACE_INLINE ssize_t TAO_AV_UDP_MCast_Transport::recv (char *buf, size_t len, ACE_Time_Value *) @@ -361,7 +369,7 @@ TAO_AV_UDP_MCast_Transport::recv (char *buf, return this->handler_->get_mcast_socket ()->recv (buf, len,this->peer_addr_); } -ssize_t +ACE_INLINE ssize_t TAO_AV_UDP_MCast_Transport::recv (char *buf, size_t len, int flags, @@ -374,14 +382,16 @@ TAO_AV_UDP_MCast_Transport::recv (char *buf, timeout); } + ssize_t TAO_AV_UDP_MCast_Transport::recv (iovec *iov, - int iovcnt, + int /*iovcnt*/, ACE_Time_Value *timeout) { return handler_->get_mcast_socket ()->recv (iov,this->peer_addr_,0,timeout); } + //------------------------------------------------------------ // TAO_AV_UDP_MCast_Protocol_Factory //------------------------------------------------------------ @@ -400,6 +410,7 @@ TAO_AV_UDP_MCast_Protocol_Factory::match_protocol (TAO_AV_Core::Protocol protoco return (protocol == TAO_AV_Core::TAO_AV_UDP_MCAST); } + TAO_AV_Acceptor* TAO_AV_UDP_MCast_Protocol_Factory::make_acceptor (void) { diff --git a/TAO/orbsvcs/orbsvcs/AV/MCast.h b/TAO/orbsvcs/orbsvcs/AV/MCast.h index ca01fbe2632..6b48459895a 100644 --- a/TAO/orbsvcs/orbsvcs/AV/MCast.h +++ b/TAO/orbsvcs/orbsvcs/AV/MCast.h @@ -136,7 +136,7 @@ public: // Dtor virtual ACE_HANDLE get_handle (void) const; virtual int handle_input (ACE_HANDLE fd); - virtual ACE_SOCK_Dgram_Mcast *get_mcast_socket (void) const; + ACE_SOCK_Dgram_Mcast *get_mcast_socket (void) const; protected: ACE_INET_Addr peer_addr_; ACE_SOCK_Dgram_Mcast *dgram_mcast_; @@ -154,4 +154,8 @@ public: virtual TAO_AV_Connector *make_connector (void); }; +#if defined(__ACE_INLINE__) +#include "MCast.i" +#endif /* __ACE_INLINE__ */ + #endif /* TAO_AV_MCAST_H */ diff --git a/TAO/orbsvcs/orbsvcs/AV/Nil.cpp b/TAO/orbsvcs/orbsvcs/AV/Nil.cpp index ac63534fb64..652e36cc06a 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Nil.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/Nil.cpp @@ -8,7 +8,7 @@ int TAO_AV_TCP_Object::send_frame (ACE_Message_Block *frame, - ACE_UINT32 timestamp) + ACE_UINT32 /*timestamp*/) { int result = this->transport_->send (frame); if (result < 0) @@ -22,6 +22,10 @@ TAO_AV_TCP_Object::TAO_AV_TCP_Object (TAO_AV_Callback *callback, { } +TAO_AV_TCP_Object::~TAO_AV_TCP_Object (void) +{ + // No-op +} int TAO_AV_TCP_Object::end_stream (void) { @@ -34,7 +38,7 @@ TAO_AV_TCP_Object::end_stream (void) int TAO_AV_UDP_Object::send_frame (ACE_Message_Block *frame, - ACE_UINT32 timestamp) + ACE_UINT32 /*timestamp*/) { ACE_DEBUG ((LM_DEBUG,"TAO_AV_UDP_Object::send_frame\n")); int result = this->transport_->send (frame); @@ -49,6 +53,10 @@ TAO_AV_UDP_Object::TAO_AV_UDP_Object (TAO_AV_Callback *callback, { } +TAO_AV_UDP_Object::~TAO_AV_UDP_Object (void) +{ + //no-op +} int TAO_AV_UDP_Object::end_stream (void) @@ -60,9 +68,21 @@ TAO_AV_UDP_Object::end_stream (void) // TAO_AV_UDP_MCast_Object //------------------------------------------------------------ + +TAO_AV_UDP_MCast_Object::TAO_AV_UDP_MCast_Object (TAO_AV_Callback *callback, + TAO_AV_Transport *transport) + :TAO_AV_Protocol_Object (callback,transport) +{ +} + +TAO_AV_UDP_MCast_Object::~TAO_AV_UDP_MCast_Object (void) +{ + //no-op +} + int TAO_AV_UDP_MCast_Object::send_frame (ACE_Message_Block *frame, - ACE_UINT32 timestamp) + ACE_UINT32 /*timestamp*/) { int result = this->transport_->send (frame); if (result < 0) @@ -70,12 +90,6 @@ TAO_AV_UDP_MCast_Object::send_frame (ACE_Message_Block *frame, return 0; } -TAO_AV_UDP_MCast_Object::TAO_AV_UDP_MCast_Object (TAO_AV_Callback *callback, - TAO_AV_Transport *transport) - :TAO_AV_Protocol_Object (callback,transport) -{ -} - int TAO_AV_UDP_MCast_Object::end_stream (void) { diff --git a/TAO/orbsvcs/orbsvcs/AV/Nil.h b/TAO/orbsvcs/orbsvcs/AV/Nil.h index e69bd3d6a5d..ad07ede42d1 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Nil.h +++ b/TAO/orbsvcs/orbsvcs/AV/Nil.h @@ -29,6 +29,9 @@ public: TAO_AV_TCP_Object (TAO_AV_Callback *callback, TAO_AV_Transport *transport = 0); + virtual ~TAO_AV_TCP_Object (void); + // Dtor + virtual int send_frame (ACE_Message_Block *frame, ACE_UINT32 timestamp = 0); // send a data frame. @@ -45,6 +48,9 @@ public: TAO_AV_UDP_Object (TAO_AV_Callback *callback, TAO_AV_Transport *transport = 0); + virtual ~TAO_AV_UDP_Object (void); + // Dtor + virtual int send_frame (ACE_Message_Block *frame, ACE_UINT32 timestamp = 0); // send a data frame. @@ -60,6 +66,9 @@ public: TAO_AV_UDP_MCast_Object (TAO_AV_Callback *callback, TAO_AV_Transport *transport = 0); + virtual ~TAO_AV_UDP_MCast_Object (void); + // Dtor + virtual int send_frame (ACE_Message_Block *frame, ACE_UINT32 timestamp = 0); // send a data frame. diff --git a/TAO/orbsvcs/orbsvcs/AV/Policy.cpp b/TAO/orbsvcs/orbsvcs/AV/Policy.cpp index bd8c0398a2c..49e1d09fc8a 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Policy.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/Policy.cpp @@ -7,11 +7,6 @@ TAO_AV_Policy::TAO_AV_Policy (TAO_AV_Policy::PolicyType type) { } -TAO_AV_Policy::PolicyType -TAO_AV_Policy::type (void) -{ - return this->type_; -} TAO_AV_SSRC_Policy::TAO_AV_SSRC_Policy (CORBA::ULong ssrc) :TAO_AV_Policy (TAO_AV_Policy::TAO_AV_SSRC_POLICY), @@ -19,17 +14,6 @@ TAO_AV_SSRC_Policy::TAO_AV_SSRC_Policy (CORBA::ULong ssrc) { } -CORBA::ULong -TAO_AV_SSRC_Policy::value (void) -{ - return this->ssrc_; -} - -void -TAO_AV_SSRC_Policy::value (CORBA::ULong ssrc) -{ - this->ssrc_ = ssrc; -} TAO_AV_Payload_Type_Policy::TAO_AV_Payload_Type_Policy (int payload_type) :TAO_AV_Policy (TAO_AV_Policy::TAO_AV_PAYLOAD_TYPE_POLICY), @@ -37,17 +21,6 @@ TAO_AV_Payload_Type_Policy::TAO_AV_Payload_Type_Policy (int payload_type) { } -void -TAO_AV_Payload_Type_Policy::value (int pt) -{ - this->payload_type_ = pt; -} - -int -TAO_AV_Payload_Type_Policy::value (void) -{ - return this->payload_type_; -} TAO_AV_Policy * TAO_AV_Policy_Manager::create_policy (TAO_AV_Policy::PolicyType type, @@ -58,7 +31,7 @@ TAO_AV_Policy_Manager::create_policy (TAO_AV_Policy::PolicyType type, { case TAO_AV_Policy::TAO_AV_PAYLOAD_TYPE_POLICY: { - int *payload_type = ACE_dynamic_cast (int *,value); + int *payload_type = ACE_static_cast (int *,value); if (payload_type == 0) ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_Policy_Manager::create_policy:Invalid value\n"),0); ACE_NEW_RETURN (policy, @@ -68,7 +41,7 @@ TAO_AV_Policy_Manager::create_policy (TAO_AV_Policy::PolicyType type, break; case TAO_AV_Policy::TAO_AV_SSRC_POLICY: { - CORBA::ULong *ssrc = ACE_dynamic_cast (CORBA::ULong *,value); + CORBA::ULong *ssrc = ACE_static_cast (CORBA::ULong *,value); if (ssrc == 0) ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_Policy_Manager::create_policy:Invalid value\n"),0); ACE_NEW_RETURN (policy, @@ -89,29 +62,9 @@ TAO_AV_Protocol_Object::TAO_AV_Protocol_Object (TAO_AV_Callback *callback, { } -TAO_AV_Transport* -TAO_AV_Protocol_Object::transport (void) -{ - return this->transport_; -} - -void -TAO_AV_Protocol_Object::transport (TAO_AV_Transport *transport) -{ - this->transport_ = transport; -} - -int -TAO_AV_Protocol_Object::set_policies (PolicyList &policy_list) -{ - this->policy_list_ = policy_list; - return 0; -} - -PolicyList -TAO_AV_Protocol_Object::get_policies (void) +TAO_AV_Protocol_Object::~TAO_AV_Protocol_Object (void) { - return this->policy_list_; + //no-op } int @@ -140,7 +93,7 @@ TAO_AV_Callback::handle_stop (void) } int -TAO_AV_Callback::receive_frame (ACE_Message_Block *frame) +TAO_AV_Callback::receive_frame (ACE_Message_Block */*frame*/) { return -1; } @@ -160,3 +113,4 @@ template class TAO_Unbounded_Sequence; #pragma instantiate TAO_Unbounded_Sequence #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + diff --git a/TAO/orbsvcs/orbsvcs/AV/Policy.h b/TAO/orbsvcs/orbsvcs/AV/Policy.h index 8a672776b7b..af586a1e7fd 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Policy.h +++ b/TAO/orbsvcs/orbsvcs/AV/Policy.h @@ -22,7 +22,7 @@ #include "tao/TAO.h" #include "Transport.h" -class TAO_AV_Policy +class TAO_ORBSVCS_Export TAO_AV_Policy { public: enum PolicyType @@ -83,6 +83,9 @@ public: TAO_AV_Protocol_Object (TAO_AV_Callback *callback, TAO_AV_Transport *transport = 0); // constructor. + + virtual ~TAO_AV_Protocol_Object (void); + // Destructor int set_policies (PolicyList &policy_list); PolicyList get_policies (void); @@ -108,4 +111,7 @@ protected: TAO_AV_Callback *callback_; }; +#if defined(__ACE_INLINE__) +#include "Policy.i" +#endif /* __ACE_INLINE__ */ #endif /* TAO_AV_POLICY_H */ diff --git a/TAO/orbsvcs/orbsvcs/AV/RTP.cpp b/TAO/orbsvcs/orbsvcs/AV/RTP.cpp index 7f9aa031dd1..47e355f7682 100644 --- a/TAO/orbsvcs/orbsvcs/AV/RTP.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/RTP.cpp @@ -143,7 +143,7 @@ TAO_AV_RTCP::handle_input (TAO_AV_Transport *transport, case AF_INET: { ACE_INET_Addr *inet_addr = - ACE_dynamic_cast (ACE_INET_Addr *,&peer_addr); + ACE_static_cast (ACE_INET_Addr *,&peer_addr); addr = inet_addr->get_ip_address (); } break; @@ -297,7 +297,7 @@ TAO_AV_RTP_UDP_Flow_Handler::TAO_AV_RTP_UDP_Flow_Handler (TAO_AV_Callback *callb } int -TAO_AV_RTP_UDP_Flow_Handler::handle_input (ACE_HANDLE fd) +TAO_AV_RTP_UDP_Flow_Handler::handle_input (ACE_HANDLE /*fd*/) { TAO_AV_RTP::rtphdr header; ACE_Message_Block *data = 0; @@ -325,7 +325,7 @@ TAO_AV_RTCP_UDP_Flow_Handler::TAO_AV_RTCP_UDP_Flow_Handler (void) } int -TAO_AV_RTCP_UDP_Flow_Handler::handle_input (ACE_HANDLE fd) +TAO_AV_RTCP_UDP_Flow_Handler::handle_input (ACE_HANDLE /*fd*/) { TAO_AV_RTCP::rtcphdr rtcp_header; int result = TAO_AV_RTCP::handle_input (this->transport_, @@ -336,8 +336,8 @@ TAO_AV_RTCP_UDP_Flow_Handler::handle_input (ACE_HANDLE fd) } int -TAO_AV_RTCP_UDP_Flow_Handler::handle_timeout (const ACE_Time_Value &tv, - const void *arg) +TAO_AV_RTCP_UDP_Flow_Handler::handle_timeout (const ACE_Time_Value &/*tv*/, + const void */*arg*/) { return -1; } @@ -359,7 +359,7 @@ TAO_AV_RTP_Object::send_frame (ACE_Message_Block *frame, case TAO_AV_Policy::TAO_AV_PAYLOAD_TYPE_POLICY: { TAO_AV_Payload_Type_Policy *payload_policy = - ACE_dynamic_cast (TAO_AV_Payload_Type_Policy *,policy); + ACE_static_cast (TAO_AV_Payload_Type_Policy *,policy); if (payload_policy == 0) ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_RTP_Object::send_frame:Payload policy not defined\n"),-1); format = payload_policy->value (); @@ -368,7 +368,7 @@ TAO_AV_RTP_Object::send_frame (ACE_Message_Block *frame, case TAO_AV_Policy::TAO_AV_SSRC_POLICY: { TAO_AV_SSRC_Policy *ssrc_policy = - ACE_dynamic_cast (TAO_AV_SSRC_Policy *,policy); + ACE_static_cast (TAO_AV_SSRC_Policy *,policy); if (ssrc_policy == 0) ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_RTP_Object::send_frame:SSRC policy not defined\n"),-1); ssrc = ssrc_policy->value ();; diff --git a/TAO/orbsvcs/orbsvcs/AV/RTP.h b/TAO/orbsvcs/orbsvcs/AV/RTP.h index 096964bbc01..becef790efa 100644 --- a/TAO/orbsvcs/orbsvcs/AV/RTP.h +++ b/TAO/orbsvcs/orbsvcs/AV/RTP.h @@ -53,15 +53,15 @@ #ifndef TAO_AV_RTP_H #define TAO_AV_RTP_H -#ifndef WIN32 -#include -#endif -extern "C" { -#include -#ifndef WIN32 -#include -#endif -} +//#ifndef WIN32 +//#include +//#endif +//extern "C" { + //#include +//#ifndef WIN32 + //#include +//#endif +//} #include "Policy.h" #include "Transport.h" @@ -267,7 +267,7 @@ public: ACE_UINT16 blkno; }; - static bad_version_; + static int bad_version_; static int handle_input (TAO_AV_Transport *transport, rtphdr &header, ACE_Message_Block *&data, @@ -337,6 +337,7 @@ class TAO_AV_RTP_Object public: TAO_AV_RTP_Object (TAO_AV_Callback *callback, TAO_AV_Transport *transport = 0); + int send_frame (ACE_Message_Block *frame, ACE_UINT32 timestamp = 0); int end_stream (void); diff --git a/TAO/orbsvcs/orbsvcs/AV/Transport.cpp b/TAO/orbsvcs/orbsvcs/AV/Transport.cpp index 56fb761daea..39507209528 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Transport.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/Transport.cpp @@ -819,7 +819,7 @@ TAO_AV_UDP_Transport::set_remote_address (const ACE_INET_Addr &address) } int -TAO_AV_UDP_Transport::open (ACE_Addr *address) +TAO_AV_UDP_Transport::open (ACE_Addr */*address*/) { return 0; } @@ -837,7 +837,7 @@ TAO_AV_UDP_Transport::mtu (void) } int -TAO_AV_UDP_Transport::get_peer_addr (ACE_Addr &addr) +TAO_AV_UDP_Transport::get_peer_addr (ACE_Addr &/*addr*/) { return -1; } @@ -948,7 +948,7 @@ TAO_AV_UDP_Transport::recv (char *buf, ssize_t TAO_AV_UDP_Transport::recv (iovec *iov, - int iovcnt, + int /*iovcnt*/, ACE_Time_Value *timeout) { return handler_->get_socket ()->recv (iov,this->peer_addr_,0,timeout); @@ -973,7 +973,7 @@ TAO_AV_TCP_Transport::~TAO_AV_TCP_Transport (void) } int -TAO_AV_TCP_Transport::open (ACE_Addr *address) +TAO_AV_TCP_Transport::open (ACE_Addr */*address*/) { return 0; } @@ -991,7 +991,7 @@ TAO_AV_TCP_Transport::mtu (void) } int -TAO_AV_TCP_Transport::get_peer_addr (ACE_Addr &addr) +TAO_AV_TCP_Transport::get_peer_addr (ACE_Addr &/*addr*/) { return -1; } @@ -1257,7 +1257,7 @@ int TAO_AV_Dgram_Acceptor::activate_svc_handler (TAO_AV_UDP_Flow_Handler *handler) { ACE_Event_Handler *event_handler = handler; - ACE_HANDLE fd = event_handler->get_handle (); + // ACE_HANDLE fd = event_handler->get_handle (); int result = this->reactor_->register_handler (event_handler, ACE_Event_Handler::READ_MASK); if (result < 0) @@ -1367,7 +1367,7 @@ TAO_AV_UDP_Flow_Handler::transport (void) } int -TAO_AV_UDP_Flow_Handler::handle_input (ACE_HANDLE fd) +TAO_AV_UDP_Flow_Handler::handle_input (ACE_HANDLE /*fd*/) { size_t size = 2*this->transport_->mtu (); ACE_Message_Block *frame = 0; @@ -1834,7 +1834,7 @@ TAO_AV_TCP_Flow_Handler::transport (void) } int -TAO_AV_TCP_Flow_Handler::handle_input (ACE_HANDLE fd) +TAO_AV_TCP_Flow_Handler::handle_input (ACE_HANDLE /*fd*/) { size_t size = BUFSIZ; ACE_Message_Block *frame = 0; @@ -1860,8 +1860,8 @@ template class ACE_Unbounded_Set; template class ACE_Unbounded_Set_Iterator; template class ACE_Unbounded_Set_Iterator; template class ACE_Singleton; -template class ACE_Acceptor; -template class ACE_Connector; +template class ACE_Acceptor; +template class ACE_Connector; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Node #pragma instantiate ACE_Node diff --git a/TAO/orbsvcs/orbsvcs/AV/sfp.cpp b/TAO/orbsvcs/orbsvcs/AV/sfp.cpp index 1ef1e0b7664..5e92cb35d69 100644 --- a/TAO/orbsvcs/orbsvcs/AV/sfp.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/sfp.cpp @@ -135,7 +135,7 @@ TAO_SFP_Base::handle_input (TAO_AV_Transport *transport, msg_type); if (result < 0) return result; - TAO_InputCDR &input = state.cdr; + // TAO_InputCDR &input = state.cdr; switch (msg_type) { case flowProtocol::SimpleFrame_Msg: @@ -316,72 +316,64 @@ TAO_SFP_Base::read_fragment (TAO_AV_Transport *transport, { TAO_SFP_Fragment_Table_Entry *fragment_entry = 0; int result = -1; - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - ACE_DEBUG ((LM_DEBUG,"frag_number = %d, frag_size = %d,source_id = %d sequnce_num = %d\n", - fragment.frag_number,fragment.frag_sz,fragment.source_id,fragment.sequence_num)); - - ACE_Message_Block *data; - ACE_NEW_RETURN (data, - ACE_Message_Block(fragment.frag_sz), - -1); - + + ACE_DEBUG ((LM_DEBUG,"frag_number = %d, frag_size = %d,source_id = %d sequnce_num = %d\n", + fragment.frag_number,fragment.frag_sz,fragment.source_id,fragment.sequence_num)); + + ACE_Message_Block *data; + ACE_NEW_RETURN (data, + ACE_Message_Block(fragment.frag_sz), + -1); + // Read the fragment. - int n = transport->recv (data->wr_ptr (),fragment.frag_sz); - if ((n == -1) || (n==0)) - ACE_ERROR_RETURN ((LM_ERROR,"TAO_SFP::read_fragment:%p",""),-1); - // move past the fragment header. - data->rd_ptr (fragment_len); - data->wr_ptr (n); - TAO_SFP_Base::dump_buf (data->rd_ptr (),data->length ()); - ACE_DEBUG ((LM_DEBUG,"length of %dth fragment is: %d\n", - fragment.frag_number, - data->length ())); - - TAO_SFP_Fragment_Node *new_node; - ACE_NEW_RETURN (new_node, - TAO_SFP_Fragment_Node, + int n = transport->recv (data->wr_ptr (),fragment.frag_sz); + if ((n == -1) || (n==0)) + ACE_ERROR_RETURN ((LM_ERROR,"TAO_SFP::read_fragment:%p",""),-1); + // move past the fragment header. + data->rd_ptr (fragment_len); + data->wr_ptr (n); + TAO_SFP_Base::dump_buf (data->rd_ptr (),data->length ()); + ACE_DEBUG ((LM_DEBUG,"length of %dth fragment is: %d\n", + fragment.frag_number, + data->length ())); + + TAO_SFP_Fragment_Node *new_node; + ACE_NEW_RETURN (new_node, + TAO_SFP_Fragment_Node, + -1); + new_node->fragment_info_ = fragment; + new_node->data_ = data; + if (state.fragment_table_.find (fragment.sequence_num,fragment_entry) == 0) + { + // Already an entry exists. Traverse the list and insert it at the right place. + result = fragment_entry->fragment_set_.insert (*new_node); + if (result != 0) + ACE_ERROR_RETURN ((LM_ERROR,"insert for %dth node failed\n",fragment.frag_number),-1); + // check if all the fragments have been received. + } + else + { + ACE_NEW_RETURN (fragment_entry, + TAO_SFP_Fragment_Table_Entry, -1); - new_node->fragment_info_ = fragment; - new_node->data_ = data; - if (state.fragment_table_.find (fragment.sequence_num,fragment_entry) == 0) - { - // Already an entry exists. Traverse the list and insert it at the right place. - result = fragment_entry->fragment_set_.insert (*new_node); - if (result != 0) - ACE_ERROR_RETURN ((LM_ERROR,"insert for %dth node failed\n",fragment.frag_number),-1); - // check if all the fragments have been received. - } - else - { - ACE_NEW_RETURN (fragment_entry, - TAO_SFP_Fragment_Table_Entry, - -1); - fragment_entry->fragment_set_.insert (*new_node); - // bind a new entry for this sequence number. - result = state.fragment_table_.bind (fragment.sequence_num,fragment_entry); - if (result != 0) - ACE_ERROR_RETURN ((LM_ERROR,"bind for %dth fragment failed\n", - fragment.frag_number),-1); - } - if (!(fragment.flags & 0x2)) - { - ACE_DEBUG ((LM_DEBUG,"Last fragment received\n")); - // if bit 1 is not set then there are - // no more fragments. - fragment_entry->last_received_ = 1; - // since fragment number starts from 0 to n-1 we add 1. - fragment_entry->num_fragments_ = fragment.frag_number + 1; - } + fragment_entry->fragment_set_.insert (*new_node); + // bind a new entry for this sequence number. + result = state.fragment_table_.bind (fragment.sequence_num,fragment_entry); + if (result != 0) + ACE_ERROR_RETURN ((LM_ERROR,"bind for %dth fragment failed\n", + fragment.frag_number),-1); } - ACE_CATCHANY + if (!(fragment.flags & 0x2)) { - ACE_TRY_ENV.print_exception ("TAO_SFP::read_fragment"); - return -1; + ACE_DEBUG ((LM_DEBUG,"Last fragment received\n")); + // if bit 1 is not set then there are + // no more fragments. + fragment_entry->last_received_ = 1; + // since fragment number starts from 0 to n-1 we add 1. + fragment_entry->num_fragments_ = fragment.frag_number + 1; } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); + + state.frame_block_ = check_all_fragments (fragment_entry); if (state.frame_block_ != 0) { @@ -981,7 +973,7 @@ TAO_SFP_UDP_Acceptor::make_svc_handler (TAO_AV_UDP_Flow_Handler *&handler) // @@ We should actually look at the entry and find out if we're a // sink or a source and create the appropriate handler ACE_DEBUG ((LM_DEBUG,"TAO_SFP_UDP_Acceptor::make_svc_handler\n")); - TAO_SFP_Base *sfp_base = TAO_SFP_BASE::instance (); + // TAO_SFP_Base *sfp_base = TAO_SFP_BASE::instance (); TAO_SFP_Object *object; TAO_AV_Callback *callback; this->endpoint_->get_callback (this->entry_->flowname (),callback); @@ -1048,7 +1040,7 @@ int TAO_SFP_UDP_Connector::make_svc_handler (TAO_AV_UDP_Flow_Handler *&handler) { ACE_DEBUG ((LM_DEBUG,"TAO_SFP_UDP_Connector::make_svc_handler\n")); - TAO_SFP_Base *sfp_base = TAO_SFP_BASE::instance (); + // TAO_SFP_Base *sfp_base = TAO_SFP_BASE::instance (); // @@ We should actually look at the entry and find out if we're a // sink or a source and create the appropriate handler TAO_AV_Callback *callback = 0; @@ -1078,13 +1070,13 @@ TAO_SFP_UDP_Sender_Handler::TAO_SFP_UDP_Sender_Handler (TAO_SFP_Object *object) } int -TAO_SFP_UDP_Sender_Handler::handle_input (ACE_HANDLE fd) +TAO_SFP_UDP_Sender_Handler::handle_input (ACE_HANDLE /*fd*/) { return -1; } int -TAO_SFP_UDP_Sender_Handler::handle_close (ACE_HANDLE fd, +TAO_SFP_UDP_Sender_Handler::handle_close (ACE_HANDLE /*fd*/, ACE_Reactor_Mask) { return 0; @@ -1122,7 +1114,7 @@ TAO_SFP_UDP_Receiver_Handler::TAO_SFP_UDP_Receiver_Handler (TAO_AV_Callback *cal } int -TAO_SFP_UDP_Receiver_Handler::handle_input (ACE_HANDLE fd) +TAO_SFP_UDP_Receiver_Handler::handle_input (ACE_HANDLE /*fd*/) { ACE_DEBUG ((LM_DEBUG,"TAO_SFP_UDP_Receiver_Handler::handle_input\n")); // This is the entry point for receiving data. @@ -1141,8 +1133,8 @@ TAO_SFP_UDP_Receiver_Handler::handle_input (ACE_HANDLE fd) } int -TAO_SFP_UDP_Receiver_Handler::handle_close (ACE_HANDLE fd, - ACE_Reactor_Mask mask) +TAO_SFP_UDP_Receiver_Handler::handle_close (ACE_HANDLE /*fd*/, + ACE_Reactor_Mask /*mask*/) { return 0; } @@ -1176,6 +1168,11 @@ TAO_SFP_Object::TAO_SFP_Object (TAO_AV_Callback *callback, { } +TAO_SFP_Object::~TAO_SFP_Object (void) +{ + //no-op +} + int TAO_SFP_Object::end_stream (void) { @@ -1195,7 +1192,7 @@ TAO_SFP_Object::end_stream (void) int TAO_SFP_Object::send_frame (ACE_Message_Block *frame, - ACE_UINT32 timestamp) + ACE_UINT32 /*timestamp*/) { TAO_OutputCDR out_stream; ACE_DEBUG ((LM_DEBUG,"TAO_SFP_Object::send_frame\n")); diff --git a/TAO/orbsvcs/orbsvcs/AV/sfp.h b/TAO/orbsvcs/orbsvcs/AV/sfp.h index 6f79e82f551..611e509b6cf 100644 --- a/TAO/orbsvcs/orbsvcs/AV/sfp.h +++ b/TAO/orbsvcs/orbsvcs/AV/sfp.h @@ -214,6 +214,10 @@ class TAO_ORBSVCS_Export TAO_SFP_Object public: TAO_SFP_Object (TAO_AV_Callback *callback, TAO_AV_Transport *transport = 0); + + virtual ~TAO_SFP_Object (void); + // Dtor + virtual int send_frame (ACE_Message_Block *frame, ACE_UINT32 timestamp = 0); virtual int end_stream (void); diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp index 3ac617c8e1e..329e531698f 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp @@ -26,7 +26,7 @@ FTP_Client_StreamEndPoint::FTP_Client_StreamEndPoint (TAO_ORB_Manager *orb_manag } int -FTP_Client_StreamEndPoint::get_callback (const char *flowname, +FTP_Client_StreamEndPoint::get_callback (const char */*flowname*/, TAO_AV_Callback *&callback) { ACE_Time_Value timeout (2); @@ -45,7 +45,7 @@ int FTP_Client_StreamEndPoint::set_protocol_object (const char *flowname, TAO_AV_Protocol_Object *object) { - int result = this->handler_->set_protocol_object (object); + this->handler_->set_protocol_object (object); ACE_CString flow_string (flowname); if (flow_string.find ("RTP") != flow_string.npos) { @@ -103,8 +103,8 @@ FTP_Client_Flow_Handler::set_protocol_object (TAO_AV_Protocol_Object *object) return 0; } int -FTP_Client_Flow_Handler::handle_timeout (const ACE_Time_Value &tv, - const void *arg) +FTP_Client_Flow_Handler::handle_timeout (const ACE_Time_Value &/*tv*/, + const void */*arg*/) { ACE_DEBUG ((LM_DEBUG,"FTP_Client_StreamEndPoint::handle_timeout")); ACE_Message_Block mb (BUFSIZ); -- cgit v1.2.1