summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-01-28 04:08:24 +0000
committerfhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-01-28 04:08:24 +0000
commitcea3a0cdbd40d8c7608c7d8953275f2b1432facd (patch)
tree4796175f902bc5d3a9ef5b580f5eca069154a8fa
parentf9a2f34c358b8f0be2a5b25eb75aae540bd1b7ec (diff)
downloadATCD-cea3a0cdbd40d8c7608c7d8953275f2b1432facd.tar.gz
Mon Jan 27 23:01:43 2003 Frank Hunleth <frank@hunleth.com>
-rw-r--r--TAO/ChangeLog39
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp22
2 files changed, 46 insertions, 15 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 5f75e2014b4..af87efa5e36 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,8 +1,21 @@
+Mon Jan 27 23:01:43 2003 Frank Hunleth <frank@hunleth.com>
+
+ * orbsvcs\orbsvcs\PortableGroup\UIPMC_Transport.cpp: Fixed code
+ that was supposed to fake out a good error return when the call
+ to send() fails. This fixes an exception break on WinXP when
+ the network cable is unplugged and a program makes a MIOP
+ request. The justification behide ignoring the error is
+ explained further in the code, but basically, it takes advantage
+ of the fact that MIOP is unreliable by specification, and hopes
+ that the source of the error will be corrected. Thanks to
+ Antonio Leonforte <a.leonforte@mclink.it> for pointing out the
+ exception break.
+
Mon Jan 27 19:16:33 2003 Pradeep Gore <pradeep@oomworks.com>
Made the following changes to fix the race related crashes of
Notify seen in orbsvcs/tests/Notify/performance-tests/RedGreen -
-
+
* orbsvcs\orbsvcs\Notify\Builder.cpp:
Added a refcount on each parent object per child object.
This way the parent is always alive when the child is destroyed.
@@ -18,24 +31,24 @@ Mon Jan 27 19:16:33 2003 Pradeep Gore <pradeep@oomworks.com>
derived classes should consult the TAO_NS_Object::shutdown
method's return value to determine if the shutdown should
proceed in case of multiple calls to shutdown.
-
+
* orbsvcs\orbsvcs\Notify\Object_T.cpp:
* orbsvcs\orbsvcs\Notify\Object_T.h:
Decrement the count on this Objects parent in the destructor.
Changed the signature of destroy similar to <shutdown> to avoid
multiple destoy's.
-
+
* orbsvcs\orbsvcs\Notify\Container_T.cpp:
* orbsvcs\orbsvcs\Notify\Container_T.h:
The <collection_> owned by the Container is destroyed in the
<shutdown> method now. The releases the reference count on child
objects.
-
+
* orbsvcs\orbsvcs\Notify\EventChannel.cpp:
* orbsvcs\orbsvcs\Notify\EventChannelFactory.cpp:
The <destroy> method checks the return value of base destroy
method before proceeding.
-
+
* orbsvcs\orbsvcs\Notify\Event_Map_Entry_T.cpp:
* orbsvcs\orbsvcs\Notify\Event_Map_Entry_T.h:
* orbsvcs\orbsvcs\Notify\Event_Map_Entry_T.inl:
@@ -44,7 +57,7 @@ Mon Jan 27 19:16:33 2003 Pradeep Gore <pradeep@oomworks.com>
returns a suitable entry.
The caller is responsible for decrementing the count when it no
longer needs the entry.
-
+
* orbsvcs\orbsvcs\Notify\Event_Map_T.cpp:
* orbsvcs\orbsvcs\Notify\Event_Map_T.h:
* orbsvcs\orbsvcs\Notify\Event_Map_T.inl:
@@ -52,7 +65,7 @@ Mon Jan 27 19:16:33 2003 Pradeep Gore <pradeep@oomworks.com>
can be obtained).
The <remove> method decrements the count on the entry instead of
deleteting it.
-
+
* orbsvcs\orbsvcs\Notify\Method_Request_Lookup.cpp:
Obtains the correct map entry and uses the collection in that
entry. The map is released when it is done using it.
@@ -60,12 +73,12 @@ Mon Jan 27 19:16:33 2003 Pradeep Gore <pradeep@oomworks.com>
Lookup object holds a reference count to the proxy that holds a
count on its parent and so on up to the EventChannel. The
EventChannel only destroys the Event_manager in its destructor.
-
+
* orbsvcs\orbsvcs\Notify\Notify_Service.cpp:
* orbsvcs\orbsvcs\Notify\Notify_Service.h:
Added a fake <_decr_refcnt> to satisfy the template requirements
from TAO_NS_Object_T. This will be rectified in future revisions.
-
+
* orbsvcs\orbsvcs\Notify\ProxyConsumer.cpp:
* orbsvcs\orbsvcs\Notify\ProxyConsumer.h:
* orbsvcs\orbsvcs\Notify\ProxySupplier.cpp:
@@ -77,19 +90,19 @@ Mon Jan 27 19:16:33 2003 Pradeep Gore <pradeep@oomworks.com>
* orbsvcs\orbsvcs\Notify\Timer_Reactor.cpp:
* orbsvcs\orbsvcs\Notify\Timer_Reactor.h:
Made the Timer a refcounted object.
-
+
* orbsvcs\orbsvcs\Notify\Timer_Queue.cpp:
* orbsvcs\orbsvcs\Notify\Timer_Queue.h:
Added an <impl> method to obtain the timer implementation.
* orbsvcs\orbsvcs\Notify\Worker_Task.h:
Removed the <init> method which is not required here.
-
+
* orbsvcs\orbsvcs\Notify\Reactive_Task.cpp:
* orbsvcs\orbsvcs\Notify\Reactive_Task.h:
Added an <init> method in which the Reactor based timer is
allocated.
-
+
* orbsvcs\orbsvcs\Notify\ThreadPool_Task.cpp:
* orbsvcs\orbsvcs\Notify\ThreadPool_Task.h:
The Timer Queue is allocated in the <init> method.
@@ -104,7 +117,7 @@ Mon Jan 27 17:36:51 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
Added missing switch case that prevented tao_ifr from
recognizing the element type of sequence<Object> in
- an IDL file. Thanks to Andrey Nechypurenko@mchp
+ an IDL file. Thanks to Andrey Nechypurenko@mchp
<Andrey.Nechypurenko@mchp.siemens.de> for sending in
the example IDL file that uncovered the problem.
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp
index 9a86f61ed39..7645ae8a839 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp
@@ -277,6 +277,19 @@ TAO_UIPMC_Transport::send_i (iovec *iov, int iovcnt,
const ACE_INET_Addr &addr = this->connection_handler_->addr ();
bytes_transferred = 0;
+ // Calculate the bytes to send. This value is only used for
+ // error conditions to fake a good return. We do this for
+ // semantic consistency with DIOP, and since errors aren't
+ // handled correctly from send_i (our fault). If these
+ // semantics are not desirable, the error handling problems
+ // that need to be fixed can be found in
+ // UIPMC_Connection_Handler::decr_refcount which will need to
+ // deregister the connection handler from the UIPMC_Connector
+ // cache.
+ ssize_t bytes_to_send = 0;
+ for (int i = 0; i < iovcnt; i++)
+ bytes_to_send += iov[i].iov_len;
+
MIOP_Packet fragments[MIOP_MAX_FRAGMENTS];
MIOP_Packet *current_fragment;
int num_fragments = 1;
@@ -323,7 +336,9 @@ TAO_UIPMC_Transport::send_i (iovec *iov, int iovcnt,
MIOP_MAX_FRAGMENTS));
}
- return 1; // Pretend it is o.k.
+ // Pretend it is o.k. See note by bytes_to_send calculation.
+ bytes_transferred = bytes_to_send;
+ return 1;
}
// Otherwise, initialize another fragment.
@@ -404,7 +419,10 @@ TAO_UIPMC_Transport::send_i (iovec *iov, int iovcnt,
ACE_TEXT (" %p\n\n"),
ACE_TEXT ("Error returned from transport:")));
}
- return 1; // Fake a good return.
+
+ // Pretend it is o.k. See note by bytes_to_send calculation.
+ bytes_transferred = bytes_to_send;
+ return 1;
}
// Increment the number of bytes transferred, but don't