[PATCH v4 39/41] dissector: Allows ws_as attribute on switch members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 python_modules/dissector.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/python_modules/dissector.py b/python_modules/dissector.py
index 064ed64..9b84561 100644
--- a/python_modules/dissector.py
+++ b/python_modules/dissector.py
@@ -429,6 +429,10 @@ def write_switch(writer, container, switch, dest, scope):
         m = c.member
         with writer.if_block(check, not first, False) as block:
             t = m.member_type
+            if m.has_attr('ws_as'):
+                type_name = m.attributes['ws_as'][0]
+                assert(ptypes.type_exists(type_name))
+                t = ptypes.lookup_type(type_name)
             if switch.has_attr("anon"):
                 dest2 = dest
             else:
-- 
2.1.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]