summaryrefslogtreecommitdiff
path: root/client.py
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-08-24 17:13:37 +0300
committerAlon Levy <alevy@redhat.com>2010-08-24 17:13:37 +0300
commita2fbe2cb0fc62bc6621050aa3db619ebdcaa2ab1 (patch)
treeb75508ce824c60743b2cbe4c21a6fdc8321aba6c /client.py
parent2c4e8749e1a3bc7b523ee1fc609430b920cfdb4e (diff)
support spice1.proto, output surface id's in right column, small fixes
Diffstat (limited to 'client.py')
-rw-r--r--client.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/client.py b/client.py
index aa164cb..9311f06 100644
--- a/client.py
+++ b/client.py
@@ -53,7 +53,7 @@ class SpiceDataHeader(Struct):
logger.error('bad type of packet - %s' % inst)
import pdb; pdb.set_trace()
return None
- if inst.e.size > 1000000:
+ if inst.e.size > 2000000:
logger.error('too large packet - %s' % inst)
import pdb; pdb.set_trace()
return None
@@ -89,6 +89,17 @@ class SpiceLinkHeader(Struct):
return None
return inst
+ @classmethod
+ def set_proto(cls, *args, **kw):
+ inst = cls(*args, **kw)
+ if inst.e.magic != SPICE_MAGIC:
+ logger.error('bad magic in packet: %s' % inst)
+ return None
+ import client_proto
+ client_proto.set_proto(major_version=inst.e.major_version,
+ minor_version=inst.e.minor_version)
+ return inst
+
link_header_size = SpiceLinkHeader.size
class SpiceLinkMess(Struct):