You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2008/03/05 12:26:58 UTC
svn commit: r633820 - in /incubator/qpid/trunk/qpid/python: hello-010-world
qpid/framer.py
Author: rhs
Date: Wed Mar 5 03:26:52 2008
New Revision: 633820
URL: http://svn.apache.org/viewvc?rev=633820&view=rev
Log:
added frame-end back as a temporary workaround for C++; added a timeout to the hello-010-world session open
Modified:
incubator/qpid/trunk/qpid/python/hello-010-world
incubator/qpid/trunk/qpid/python/qpid/framer.py
Modified: incubator/qpid/trunk/qpid/python/hello-010-world
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/hello-010-world?rev=633820&r1=633819&r2=633820&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/hello-010-world (original)
+++ incubator/qpid/trunk/qpid/python/hello-010-world Wed Mar 5 03:26:52 2008
@@ -13,7 +13,7 @@
conn = Connection(connect("0.0.0.0", spec.port), spec)
conn.start(timeout=10)
-ssn = conn.session("my-session")
+ssn = conn.session("my-session", timeout=10)
ssn.queue_declare("asdf")
Modified: incubator/qpid/trunk/qpid/python/qpid/framer.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/framer.py?rev=633820&r1=633819&r2=633820&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/framer.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/framer.py Wed Mar 5 03:26:52 2008
@@ -123,12 +123,18 @@
track = frame.track & 0x0F
self.pack(Frame.HEADER, frame.flags, frame.type, size, track, frame.channel)
self.write(frame.payload)
+ # XXX: NOT 0-10 FINAL, TEMPORARY WORKAROUND for C++
+ self.write("\xCE")
frm.debug("SENT: %s", frame)
def read_frame(self):
flags, type, size, track, channel = self.unpack(Frame.HEADER)
if flags & 0xF0: raise FramingError()
payload = self.read(size - struct.calcsize(Frame.HEADER))
+ # XXX: NOT 0-10 FINAL, TEMPORARY WORKAROUND for C++
+ end = self.read(1)
+ if end != "\xCE":
+ raise FramingError()
frame = Frame(flags, type, track, channel, payload)
frm.debug("RECV: %s", frame)
return frame