summaryrefslogtreecommitdiff
path: root/ACE/protocols
diff options
context:
space:
mode:
authorAbdullah Sowayan <sowayan@users.noreply.github.com>2007-07-04 06:06:59 +0000
committerAbdullah Sowayan <sowayan@users.noreply.github.com>2007-07-04 06:06:59 +0000
commit7af050dbf90dce30c7d10a24c66f4dbf20705087 (patch)
tree4132e4aad214de151dff974f033606b98bc6f71e /ACE/protocols
parenta173fd069078b45fd479601c68b9313582933fd2 (diff)
downloadATCD-7af050dbf90dce30c7d10a24c66f4dbf20705087.tar.gz
Wed Jul 4 06:02:38 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com>
Diffstat (limited to 'ACE/protocols')
-rw-r--r--ACE/protocols/ace/HTBP/HTBP_Filter.cpp2
-rw-r--r--ACE/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp4
-rw-r--r--ACE/protocols/ace/HTBP/HTBP_Outside_Squid_Filter.cpp4
-rw-r--r--ACE/protocols/ace/RMCast/Acknowledge.cpp12
-rw-r--r--ACE/protocols/ace/RMCast/Flow.cpp6
-rw-r--r--ACE/protocols/ace/RMCast/Fragment.cpp3
-rw-r--r--ACE/protocols/ace/RMCast/Link.cpp21
-rw-r--r--ACE/protocols/ace/RMCast/Reassemble.cpp3
-rw-r--r--ACE/protocols/ace/RMCast/Retransmit.cpp9
-rw-r--r--ACE/protocols/ace/RMCast/Simulator.cpp8
-rw-r--r--ACE/protocols/ace/RMCast/Socket.cpp31
-rw-r--r--ACE/protocols/ace/RMCast/Stack.cpp6
-rw-r--r--ACE/protocols/ace/TMCast/Group.cpp19
-rw-r--r--ACE/protocols/examples/RMCast/Send_Msg/Receiver.cpp3
-rw-r--r--ACE/protocols/examples/RMCast/Send_Msg/Sender.cpp2
-rw-r--r--ACE/protocols/tests/RMCast/Receiver.cpp2
-rw-r--r--ACE/protocols/tests/RMCast/Sender.cpp2
17 files changed, 69 insertions, 68 deletions
diff --git a/ACE/protocols/ace/HTBP/HTBP_Filter.cpp b/ACE/protocols/ace/HTBP/HTBP_Filter.cpp
index 2ac714b8904..094539c05a0 100644
--- a/ACE/protocols/ace/HTBP/HTBP_Filter.cpp
+++ b/ACE/protocols/ace/HTBP/HTBP_Filter.cpp
@@ -39,7 +39,7 @@ ACE::HTBP::Filter::header_complete (ACE::HTBP::Channel *ch)
if (code && code < nl)
{
code += 9; // skip past "HTTP/1.1 "
- this->http_code_ = strtol(code,0,10);
+ this->http_code_ = ACE_OS::strtol(code,0,10);
}
}
diff --git a/ACE/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp b/ACE/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp
index acb019ce2bb..7433ac34d7c 100644
--- a/ACE/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp
+++ b/ACE/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp
@@ -145,7 +145,7 @@ ACE::HTBP::Inside_Squid_Filter::recv_data_header (ACE::HTBP::Channel *ch)
{
tpos += token.length();
*nl = 0;
- ch->data_len (strtol(tpos,0,10));
+ ch->data_len (ACE_OS::strtol(tpos,0,10));
start = nl+1;
}
@@ -224,7 +224,7 @@ ACE::HTBP::Inside_Squid_Filter::recv_ack (ACE::HTBP::Channel *ch)
{
tpos += token.length();
*nl = 0;
- ch->data_len (strtol(tpos,0,10));
+ ch->data_len (ACE_OS::strtol(tpos,0,10));
start = nl+1;
}
diff --git a/ACE/protocols/ace/HTBP/HTBP_Outside_Squid_Filter.cpp b/ACE/protocols/ace/HTBP/HTBP_Outside_Squid_Filter.cpp
index 05e79083794..76cf7b7af4f 100644
--- a/ACE/protocols/ace/HTBP/HTBP_Outside_Squid_Filter.cpp
+++ b/ACE/protocols/ace/HTBP/HTBP_Outside_Squid_Filter.cpp
@@ -103,7 +103,7 @@ ACE::HTBP::Outside_Squid_Filter::recv_data_header (ACE::HTBP::Channel *ch)
"missing sender key"),0);
}
*slash = 0;
- session_id.id_ = strtol(start,0,10);
+ session_id.id_ = ACE_OS::strtol(start,0,10);
start = slash + 1;
if (is_inbound)
@@ -115,7 +115,7 @@ ACE::HTBP::Outside_Squid_Filter::recv_data_header (ACE::HTBP::Channel *ch)
nl = ACE_OS::strchr(tpos,'\n');
tpos += token.length();
*nl = 0;
- ch->data_len(strtol(tpos,0,10));
+ ch->data_len(ACE_OS::strtol(tpos,0,10));
start = nl+1;
}
}
diff --git a/ACE/protocols/ace/RMCast/Acknowledge.cpp b/ACE/protocols/ace/RMCast/Acknowledge.cpp
index d3aeb7630f2..055041c0287 100644
--- a/ACE/protocols/ace/RMCast/Acknowledge.cpp
+++ b/ACE/protocols/ace/RMCast/Acknowledge.cpp
@@ -136,13 +136,19 @@ namespace ACE_RMCast
{
Message_ptr* ppm;
i.next (ppm);
+
+ //FUZZ: disable check_for_lack_ACE_OS
send (*ppm);
+ //FUZZ: enable check_for_lack_ACE_OS
}
// Go to sleep but watch for "manual cancellation" request.
//
{
+ //FUZZ: disable check_for_lack_ACE_OS
ACE_Time_Value time (ACE_OS::gettimeofday ());
+ //FUZZ: enable check_for_lack_ACE_OS
+
time += params_.tick ();
Lock l (mutex_);
@@ -235,8 +241,7 @@ namespace ACE_RMCast
}
}
- void Acknowledge::
- recv (Message_ptr m)
+ void Acknowledge::recv (Message_ptr m)
{
// Handle NRTM. There could be some nasty interaction with code
// that handles data below (like missing message and NAK). This
@@ -320,8 +325,7 @@ namespace ACE_RMCast
}
}
- void Acknowledge::
- send (Message_ptr m)
+ void Acknowledge::send (Message_ptr m)
{
if (Data const* data = static_cast<Data const*> (m->find (Data::id)))
{
diff --git a/ACE/protocols/ace/RMCast/Flow.cpp b/ACE/protocols/ace/RMCast/Flow.cpp
index a415862647e..c5d9f63a754 100644
--- a/ACE/protocols/ace/RMCast/Flow.cpp
+++ b/ACE/protocols/ace/RMCast/Flow.cpp
@@ -28,8 +28,7 @@ namespace ACE_RMCast
{
}
- void Flow::
- send (Message_ptr m)
+ void Flow::send (Message_ptr m)
{
if (Data const* data = static_cast<Data const*> (m->find (Data::id)))
{
@@ -97,8 +96,7 @@ namespace ACE_RMCast
out_->send (m);
}
- void Flow::
- recv (Message_ptr m)
+ void Flow::recv (Message_ptr m)
{
if (NAK const* nak = static_cast<NAK const*> (m->find (NAK::id)))
{
diff --git a/ACE/protocols/ace/RMCast/Fragment.cpp b/ACE/protocols/ace/RMCast/Fragment.cpp
index 27247f0e3f9..9a483e7cfbe 100644
--- a/ACE/protocols/ace/RMCast/Fragment.cpp
+++ b/ACE/protocols/ace/RMCast/Fragment.cpp
@@ -19,8 +19,7 @@ namespace ACE_RMCast
{
}
- void Fragment::
- send (Message_ptr m)
+ void Fragment::send (Message_ptr m)
{
if (Data const* data = static_cast<Data const*> (m->find (Data::id)))
{
diff --git a/ACE/protocols/ace/RMCast/Link.cpp b/ACE/protocols/ace/RMCast/Link.cpp
index 5365519e650..12e6003d456 100644
--- a/ACE/protocols/ace/RMCast/Link.cpp
+++ b/ACE/protocols/ace/RMCast/Link.cpp
@@ -5,8 +5,8 @@
#include "ace/Time_Value.h" // ACE_Time_Value
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_stdlib.h"
-#include "ace/OS_NS_sys_socket.h"
#include "ace/OS_NS_time.h"
+#include "ace/OS_NS_sys_socket.h"
#include "Link.h"
@@ -31,7 +31,7 @@ namespace ACE_RMCast
stop_ (false)
{
- srand ((unsigned int) ACE_OS::time (0));
+ ACE_OS::srand ((unsigned int) ACE_OS::time (0));
rsock_.set_option (IP_MULTICAST_LOOP, 0);
@@ -105,14 +105,13 @@ namespace ACE_RMCast
Element::in_stop ();
}
- void Link::
- send (Message_ptr m)
+ void Link::send (Message_ptr m)
{
// Simulate message loss and reordering.
//
if (params_.simulator ())
{
- if ((rand () % 17) != 0)
+ if ((ACE_OS::rand () % 17) != 0)
{
Lock l (mutex_);
@@ -124,7 +123,7 @@ namespace ACE_RMCast
}
else
{
- if ((rand () % 17) != 0)
+ if ((ACE_OS::rand () % 17) != 0)
{
send_ (m);
}
@@ -179,14 +178,13 @@ namespace ACE_RMCast
/*
if (m->find (nrtm::id))
{
- write (1, os.buffer (), os.length ());
- exit (1);
+ ACE_OS::write (1, os.buffer (), os.length ());
+ ACE_OS::exit (1);
}
*/
}
- void Link::
- recv ()
+ void Link::recv ()
{
size_t max_packet_size (params_.max_packet_size ());
@@ -332,8 +330,7 @@ namespace ACE_RMCast
return 0;
}
- void Link::
- recv (Message_ptr)
+ void Link::recv (Message_ptr)
{
ACE_OS::abort ();
}
diff --git a/ACE/protocols/ace/RMCast/Reassemble.cpp b/ACE/protocols/ace/RMCast/Reassemble.cpp
index ee1837d7ac3..e5aeab92519 100644
--- a/ACE/protocols/ace/RMCast/Reassemble.cpp
+++ b/ACE/protocols/ace/RMCast/Reassemble.cpp
@@ -19,8 +19,7 @@ namespace ACE_RMCast
{
}
- void Reassemble::
- recv (Message_ptr m)
+ void Reassemble::recv (Message_ptr m)
{
Map::ENTRY* e;
Address from (
diff --git a/ACE/protocols/ace/RMCast/Retransmit.cpp b/ACE/protocols/ace/RMCast/Retransmit.cpp
index b968908f82b..6611bb14b52 100644
--- a/ACE/protocols/ace/RMCast/Retransmit.cpp
+++ b/ACE/protocols/ace/RMCast/Retransmit.cpp
@@ -46,8 +46,7 @@ namespace ACE_RMCast
Element::out_stop ();
}
- void Retransmit::
- send (Message_ptr m)
+ void Retransmit::send (Message_ptr m)
{
if (m->find (Data::id) != 0)
{
@@ -60,8 +59,7 @@ namespace ACE_RMCast
out_->send (m);
}
- void Retransmit::
- recv (Message_ptr m)
+ void Retransmit::recv (Message_ptr m)
{
if (NAK const* nak = static_cast<NAK const*> (m->find (NAK::id)))
{
@@ -135,9 +133,12 @@ namespace ACE_RMCast
}
}
+ //FUZZ: disable check_for_lack_ACE_OS
// Go to sleep but watch for "manual cancellation" request.
//
ACE_Time_Value time (ACE_OS::gettimeofday ());
+ //FUZZ: enable check_for_lack_ACE_OS
+
time += params_.tick ();
while (!stop_)
diff --git a/ACE/protocols/ace/RMCast/Simulator.cpp b/ACE/protocols/ace/RMCast/Simulator.cpp
index 96415ca58f1..ec879c865ba 100644
--- a/ACE/protocols/ace/RMCast/Simulator.cpp
+++ b/ACE/protocols/ace/RMCast/Simulator.cpp
@@ -7,14 +7,12 @@
namespace ACE_RMCast
{
- Simulator::
- Simulator ()
+ Simulator::Simulator ()
{
- srand ((unsigned int) ACE_OS::time (0));
+ ACE_OS::srand ((unsigned int)ACE_OS::time (0));
}
- void Simulator::
- send (Message_ptr m)
+ void Simulator::send (Message_ptr m)
{
// Note: Simulator may work in unpredictable ways mainly due
// to the "reliable loopback" mechanism.
diff --git a/ACE/protocols/ace/RMCast/Socket.cpp b/ACE/protocols/ace/RMCast/Socket.cpp
index d99c666ac8f..51e6d450173 100644
--- a/ACE/protocols/ace/RMCast/Socket.cpp
+++ b/ACE/protocols/ace/RMCast/Socket.cpp
@@ -58,8 +58,9 @@ namespace ACE_RMCast
get_handle_ ();
private:
- virtual void
- recv (Message_ptr m);
+ //FUZZ: disable check_for_lack_ACE_OS
+ virtual void recv (Message_ptr m);
+ //FUZZ: enable check_for_lack_ACE_OS
private:
bool loop_;
@@ -287,8 +288,7 @@ namespace ACE_RMCast
}
- void Socket_Impl::
- recv (Message_ptr m)
+ void Socket_Impl::recv (Message_ptr m)
{
if (m->find (Data::id) != 0 || m->find (NoData::id) != 0)
{
@@ -308,7 +308,9 @@ namespace ACE_RMCast
//if (queue_.size () != 0)
// cerr << "recv socket queue size: " << queue_.size () << endl;
+ //FUZZ: disable check_for_lack_ACE_OS
bool signal (queue_.is_empty ());
+ //FUZZ: enable check_for_lack_ACE_OS
queue_.enqueue_tail (m);
@@ -346,35 +348,30 @@ namespace ACE_RMCast
{
}
- void Socket::
- send (void const* buf, size_t s)
+ void Socket::send (void const* buf, size_t s)
{
impl_->send_ (buf, s);
}
- ssize_t Socket::
- recv (void* buf, size_t s)
+ ssize_t Socket::recv (void* buf, size_t s)
{
return impl_->recv_ (buf, s, 0, 0);
}
- ssize_t Socket::
- recv (void* buf, size_t s, ACE_INET_Addr& from)
+ ssize_t Socket::recv (void* buf, size_t s, ACE_INET_Addr& from)
{
return impl_->recv_ (buf, s, 0, &from);
}
- ssize_t Socket::
- recv (void* buf, size_t s, ACE_Time_Value const& timeout)
+ ssize_t Socket::recv (void* buf, size_t s, ACE_Time_Value const& timeout)
{
return impl_->recv_ (buf, s, &timeout, 0);
}
- ssize_t Socket::
- recv (void* buf,
- size_t s,
- ACE_Time_Value const& timeout,
- ACE_INET_Addr& from)
+ ssize_t Socket::recv (void* buf,
+ size_t s,
+ ACE_Time_Value const& timeout,
+ ACE_INET_Addr& from)
{
return impl_->recv_ (buf, s, &timeout, &from);
}
diff --git a/ACE/protocols/ace/RMCast/Stack.cpp b/ACE/protocols/ace/RMCast/Stack.cpp
index aa62558b4c9..19d592f5c21 100644
--- a/ACE/protocols/ace/RMCast/Stack.cpp
+++ b/ACE/protocols/ace/RMCast/Stack.cpp
@@ -26,8 +26,7 @@ namespace ACE_RMCast
out_ = out;
}
- void Out_Element::
- send (Message_ptr m)
+ void Out_Element::send (Message_ptr m)
{
if (out_) out_->send (m);
}
@@ -59,8 +58,7 @@ namespace ACE_RMCast
in_ = in;
}
- void In_Element::
- recv (Message_ptr m)
+ void In_Element::recv (Message_ptr m)
{
if (in_) in_->recv (m);
}
diff --git a/ACE/protocols/ace/TMCast/Group.cpp b/ACE/protocols/ace/TMCast/Group.cpp
index e153b23c94d..e1947868e44 100644
--- a/ACE/protocols/ace/TMCast/Group.cpp
+++ b/ACE/protocols/ace/TMCast/Group.cpp
@@ -354,10 +354,12 @@ namespace ACE_TMCast
in_control_.subscribe (recv_cond_);
}
- void
- send (void const* msg, size_t size)
+ //FUZZ: disable check_for_lack_ACE_OS
+ void send (void const* msg, size_t size)
ACE_THROW_SPEC((Group::InvalidArg, Group::Failed, Group::Aborted))
{
+ //FUZZ: enable check_for_lack_ACE_OS
+
if (size > Protocol::MAX_PAYLOAD_SIZE) throw InvalidArg ();
// Note the potential deadlock if I lock mutex_ and out_data_ in
@@ -407,12 +409,12 @@ namespace ACE_TMCast
}
}
-
-
- size_t
- recv (void* msg, size_t size)
+ //FUZZ: disable check_for_lack_ACE_OS
+ size_t recv (void* msg, size_t size)
ACE_THROW_SPEC((Group::Failed, Group::InsufficienSpace))
{
+ //FUZZ: enable check_for_lack_ACE_OS
+
AutoLock lock (mutex_);
while (true)
@@ -430,9 +432,10 @@ namespace ACE_TMCast
{
Recv* data = dynamic_cast<Recv*> (m.get ());
- if (size < data->size ()) throw Group::InsufficienSpace ();
+ if (size < data->size ())
+ throw Group::InsufficienSpace ();
- memcpy (msg, data->payload (), data->size ());
+ ACE_OS::memcpy (msg, data->payload (), data->size ());
return data->size ();
}
diff --git a/ACE/protocols/examples/RMCast/Send_Msg/Receiver.cpp b/ACE/protocols/examples/RMCast/Send_Msg/Receiver.cpp
index f86e95192f6..c6378948fc8 100644
--- a/ACE/protocols/examples/RMCast/Send_Msg/Receiver.cpp
+++ b/ACE/protocols/examples/RMCast/Send_Msg/Receiver.cpp
@@ -27,8 +27,9 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[])
ACE_INET_Addr addr (argv[1]);
+ //FUZZ: disable check_for_lack_ACE_OS
ACE_RMCast::Socket socket (addr, false);
-
+ //FUZZ: enable check_for_lack_ACE_OS
Message expected_msg;
expected_msg.sn = 0;
diff --git a/ACE/protocols/examples/RMCast/Send_Msg/Sender.cpp b/ACE/protocols/examples/RMCast/Send_Msg/Sender.cpp
index 19d570f249c..5a1ed1674d6 100644
--- a/ACE/protocols/examples/RMCast/Send_Msg/Sender.cpp
+++ b/ACE/protocols/examples/RMCast/Send_Msg/Sender.cpp
@@ -20,7 +20,9 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[])
ACE_INET_Addr addr (argv[1]);
+ //FUZZ: disable check_for_lack_ACE_OS
ACE_RMCast::Socket socket (addr, false);
+ //FUZZ: enable check_for_lack_ACE_OS
Message msg;
msg.sn = 0;
diff --git a/ACE/protocols/tests/RMCast/Receiver.cpp b/ACE/protocols/tests/RMCast/Receiver.cpp
index 317dc8e395a..59dde33a069 100644
--- a/ACE/protocols/tests/RMCast/Receiver.cpp
+++ b/ACE/protocols/tests/RMCast/Receiver.cpp
@@ -25,9 +25,11 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[])
ACE_INET_Addr addr (argv[1]);
+ //FUZZ: disable check_for_lack_ACE_OS
// Turn on message loss and reordering simulation.
//
ACE_RMCast::Socket socket (addr, false, true);
+ //FUZZ: enable check_for_lack_ACE_OS
Message expected_msg;
diff --git a/ACE/protocols/tests/RMCast/Sender.cpp b/ACE/protocols/tests/RMCast/Sender.cpp
index 85340b6b4a0..bbc6dc1b1f7 100644
--- a/ACE/protocols/tests/RMCast/Sender.cpp
+++ b/ACE/protocols/tests/RMCast/Sender.cpp
@@ -20,9 +20,11 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[])
ACE_INET_Addr addr (argv[1]);
+ //FUZZ: disable check_for_lack_ACE_OS
// Turn on message loss and reordering simulation.
//
ACE_RMCast::Socket socket (addr, false, true);
+ //FUZZ: enable check_for_lack_ACE_OS
Message msg;
msg.sn = 0;