Author: gsim
Date: Fri Jan 11 07:29:05 2008
New Revision: 611205

URL: http://svn.apache.org/viewvc?rev=611205&view=rev
Log:
Allow more than one message to be encoded into a single buffer if available.


Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp?rev=611205&r1=611204&r2=611205&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp Fri Jan 11 
07:29:05 2008
@@ -304,8 +304,18 @@
             buffUsed += frameSize;
             QPID_LOG(trace, "SENT [" << identifier << "]: " << frame);
                        
-            if (frameQueue.empty())
-                break;
+            if (frameQueue.empty()) {
+                //if we have run out of frames, allow upper layers to
+                //generate more
+                if (!frameQueueClosed) {
+                    inputHandler->doOutput();
+                }
+                if (frameQueue.empty()) {                
+                    //if there are still no frames, we have no more to
+                    //do
+                    break;
+                }
+            }
             frame = frameQueue.front();
             frameSize = frame.size();
         }


Reply via email to