You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2012/07/27 00:45:28 UTC

svn commit: r1366219 - /qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/engine/impl/ConnectionImpl.java

Author: rajith
Date: Thu Jul 26 22:45:28 2012
New Revision: 1366219

URL: http://svn.apache.org/viewvc?rev=1366219&view=rev
Log:
NO-JIRA Removed debug code. Fixed a bug with transportWork and work
linked lists which could cause an infinite loop.

Modified:
    qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/engine/impl/ConnectionImpl.java

Modified: qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/engine/impl/ConnectionImpl.java
URL: http://svn.apache.org/viewvc/qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/engine/impl/ConnectionImpl.java?rev=1366219&r1=1366218&r2=1366219&view=diff
==============================================================================
--- qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/engine/impl/ConnectionImpl.java (original)
+++ qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/engine/impl/ConnectionImpl.java Thu Jul 26 22:45:28 2012
@@ -216,8 +216,6 @@ public class ConnectionImpl extends Endp
 
     void addModified(EndpointImpl endpoint)
     {
-        dumpList(_transportHead);
-
         if(_transportTail == null)
         {
             endpoint.setTransportNext(null);
@@ -231,20 +229,6 @@ public class ConnectionImpl extends Endp
             _transportTail = endpoint;
             _transportTail.setTransportNext(null);
         }
-
-        dumpList(_transportHead);
-    }
-
-    private void dumpList(EndpointImpl _transportHead)
-    {
-        StringBuffer buf = new StringBuffer();
-        EndpointImpl p = _transportHead;
-        while (p != null)
-        {
-            buf.append(p + "->");
-            p = p.transportNext();
-        }
-        System.out.println(buf.toString());
     }
 
     void removeModified(EndpointImpl endpoint)
@@ -266,7 +250,6 @@ public class ConnectionImpl extends Endp
         {
             endpoint.transportNext().setTransportPrev(endpoint.transportPrev());
         }
-        dumpList(_transportHead);
     }
 
     public int getMaxChannels()
@@ -313,6 +296,8 @@ public class ConnectionImpl extends Endp
         {
             if(_workTail == null)
             {
+                delivery.setWorkNext(null);
+                delivery.setWorkPrev(null);
                 _workHead = _workTail = delivery;
             }
             else
@@ -320,6 +305,7 @@ public class ConnectionImpl extends Endp
                 _workTail.setWorkNext(delivery);
                 delivery.setWorkPrev(_workTail);
                 _workTail = delivery;
+                delivery.setWorkNext(null);
             }
         }
     }
@@ -374,6 +360,8 @@ public class ConnectionImpl extends Endp
     {
         if(_transportWorkTail == null)
         {
+            delivery.setTransportWorkNext(null);
+            delivery.setTransportWorkPrev(null);
             _transportWorkHead = _transportWorkTail = delivery;
         }
         else
@@ -381,6 +369,7 @@ public class ConnectionImpl extends Endp
             _transportWorkTail.setTransportWorkNext(delivery);
             delivery.setTransportWorkPrev(_transportWorkTail);
             _transportWorkTail = delivery;
+            delivery.setTransportWorkNext(null);
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org