diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-03-05 14:46:09 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-03-05 14:46:09 +0000 |
commit | 96f3f24e623254562e48ca08979b81680bdd040e (patch) | |
tree | 99cc9ae12e8687fd32c090b98b91b018a5c2c240 /tests/RMCast | |
parent | 4dd886d75e2f0e11c60a7779a582ab7492341c23 (diff) | |
download | ATCD-96f3f24e623254562e48ca08979b81680bdd040e.tar.gz |
ChangeLogTag:Mon Mar 5 07:52:52 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
Diffstat (limited to 'tests/RMCast')
-rw-r--r-- | tests/RMCast/RMCast_Fragment_Test.cpp | 15 | ||||
-rw-r--r-- | tests/RMCast/RMCast_Reassembly_Test.cpp | 25 |
2 files changed, 20 insertions, 20 deletions
diff --git a/tests/RMCast/RMCast_Fragment_Test.cpp b/tests/RMCast/RMCast_Fragment_Test.cpp index e180ff20908..390fc626dc0 100644 --- a/tests/RMCast/RMCast_Fragment_Test.cpp +++ b/tests/RMCast/RMCast_Fragment_Test.cpp @@ -205,9 +205,7 @@ ACE_RMCast_Fragment_Tester::initialize (ACE_Message_Block *mb) { char z = 0; for (char *j = i->rd_ptr (); j != i->wr_ptr (); ++j) - { - *j = ++z; - } + *j = ++z; } } @@ -219,10 +217,10 @@ ACE_RMCast_Fragment_Tester::compare (ACE_Message_Block *mb) for (const ACE_Message_Block *i = mb; i != 0; i = i->cont ()) { - blob.copy (i->rd_ptr (), i->length ()); + blob.copy (i->wr_ptr (), i->length ()); } - if (ACE_OS::memcmp (blob.rd_ptr (), + if (ACE_OS::memcmp (blob.wr_ptr (), this->received_.rd_ptr (), n) != 0) { @@ -275,7 +273,7 @@ ACE_RMCast_Fragment_Tester::data (ACE_RMCast::Data &data) size_t fragment_size = payload_size; if (payload_size > 0) { - ACE_OS::memcpy (this->received_.rd_ptr () + offset, + ACE_OS::memcpy (this->received_.wr_ptr () + offset, mb->rd_ptr (), payload_size); this->received_bytes_ += payload_size; @@ -288,8 +286,9 @@ ACE_RMCast_Fragment_Tester::data (ACE_RMCast::Data &data) // ACE_DEBUG ((LM_DEBUG, // "offset = %d , payload = %d\n", offset, payload_size)); fragment_size += payload_size; - ACE_OS::memcpy (this->received_.rd_ptr () + offset, - i->rd_ptr (), payload_size); + ACE_OS::memcpy (this->received_.wr_ptr () + offset, + i->rd_ptr (), + payload_size); this->received_bytes_ += payload_size; offset += payload_size; } diff --git a/tests/RMCast/RMCast_Reassembly_Test.cpp b/tests/RMCast/RMCast_Reassembly_Test.cpp index dba5bffa34a..27f2aff7fa0 100644 --- a/tests/RMCast/RMCast_Reassembly_Test.cpp +++ b/tests/RMCast/RMCast_Reassembly_Test.cpp @@ -101,7 +101,7 @@ ACE_RMCast_Reassembly_Tester::svc (void) // Use an ACT to store the results in <received> ACE_Message_Block *received_pointer = &received; - ACE_OS::memcpy (big_blob.rd_ptr (), + ACE_OS::memcpy (big_blob.wr_ptr (), &received_pointer, sizeof(received_pointer)); @@ -142,7 +142,7 @@ ACE_RMCast_Reassembly_Tester::svc (void) // Use an ACT to store the results in <received> ACE_Message_Block *received_pointer = &received; - ACE_OS::memcpy (big_blob.rd_ptr (), + ACE_OS::memcpy (big_blob.wr_ptr (), &received_pointer, sizeof(received_pointer)); @@ -200,10 +200,9 @@ ACE_RMCast_Reassembly_Tester::initialize (ACE_Message_Block *mb) for (ACE_Message_Block *i = mb; i != 0; i = i->cont ()) { char z = 0; + for (char *j = i->rd_ptr (); j != i->wr_ptr (); ++j) - { - *j = ++z; - } + *j = ++z; } } @@ -215,14 +214,14 @@ ACE_RMCast_Reassembly_Tester::compare (ACE_Message_Block *received, ACE_Message_Block blob (n); for (const ACE_Message_Block *i = original; i != 0; i = i->cont ()) - { - blob.copy (i->rd_ptr (), i->length ()); - } + blob.copy (i->wr_ptr (), i->length ()); if (received->rd_ptr () == 0) - ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("INCOMPLETE MESSAGE\n")), -1); + ACE_ERROR_RETURN ((LM_DEBUG, + ACE_TEXT ("INCOMPLETE MESSAGE\n")), + -1); - if (ACE_OS::memcmp (blob.rd_ptr (), + if (ACE_OS::memcmp (blob.wr_ptr (), received->rd_ptr (), n) != 0) { @@ -257,12 +256,14 @@ ACE_RMCast_Reassembly_Tester::data (ACE_RMCast::Data &data) ACE_Message_Block *mb = data.payload; ACE_Message_Block *pointer; - ACE_OS::memcpy (&pointer, mb->rd_ptr (), sizeof(pointer)); + ACE_OS::memcpy (&pointer, + mb->wr_ptr (), + sizeof (pointer)); size_t l = mb->length (); pointer->size (l); pointer->wr_ptr (pointer->rd_ptr () + l); - ACE_OS::memcpy (pointer->rd_ptr (), mb->rd_ptr (), l); + ACE_OS::memcpy (pointer->wr_ptr (), mb->rd_ptr (), l); return 0; } |