[Ocfs2-tools-devel] [PATCH 5/8] odump.py: fix cookie parser v2
Jeff Liu
jeff.liu at oracle.com
Fri Aug 21 20:23:27 PDT 2009
the cookie format was changed in wireshark dissector, fix it according to current format
Signed-off-by: Jeff Liu <jeff.liu at oracle.com>
---
ADDONS/odump.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ADDONS/odump.py b/ADDONS/odump.py
index ce6237b..58946ba 100755
--- a/ADDONS/odump.py
+++ b/ADDONS/odump.py
@@ -211,7 +211,7 @@ def ConvertLockMsg(odict, fmtstr=COOKIE_FMT + FLAGS_FMT + \
''' returns cookie; flags; node_idx; requested_type; name; '''
if odict.has_key('Cookie'):
- cookie = odict['Cookie'][0].strip()
+ cookie = odict['Cookie'][0].split('(')[0].strip()
else:
cookie = ' '
@@ -241,7 +241,7 @@ def CreateLockMsg(odict, fmtstr=COOKIE_FMT + FLAGS_FMT + NODEIDX_FMT + REQTYPE_F
''' cookie; flags; node_idx; requested_type; name'''
if odict.has_key('Cookie'):
- cookie = odict['Cookie'][0].strip()
+ cookie = odict['Cookie'][0].split('(')[0].strip()
else:
cookie = ' '
@@ -273,7 +273,7 @@ def UnlockLockMsg(odict, fmtstr=COOKIE_FMT + FLAGS_FMT + \
''' cookie; flags; node_idx; name; '''
if odict.has_key('Cookie'):
- cookie = odict['Cookie'][0].strip()
+ cookie = odict['Cookie'][0].split('(')[0].strip()
else:
cookie = ' '
@@ -300,7 +300,7 @@ def ProxyASTMsg(odict, fmtstr=COOKIE_FMT + FLAGS_FMT + \
NODEIDX_FMT + BLKT_FMT + NAME_FMT):
if odict.has_key('Cookie'):
- cookie = odict['Cookie'][0].strip()
+ cookie = odict['Cookie'][0].split('(')[0].strip()
else:
cookie = ' '
--
1.5.4.3
More information about the Ocfs2-tools-devel
mailing list