From 0167af41624e8ef86b657d83ece09fe4e12fd6a2 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 6 May 2009 21:30:29 -0700 Subject: Make big requests support work without modifying buffer Fixes corruption of big requests data in -v4/raw output Signed-off-by: Alan Coopersmith --- x11.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'x11.h') diff --git a/x11.h b/x11.h index 37e6a43..db5abe7 100644 --- a/x11.h +++ b/x11.h @@ -579,4 +579,14 @@ extern const char REQUESTHEADER[], EVENTHEADER[], ERRORHEADER[], REPLYHEADER[]; #define GC_dashes 0x00200000L #define GC_arc_mode 0x00400000L +#define printreqlen(buf, fd, dvalue) \ + do { \ + if (IShort(&(buf)[2]) == 0 && CS[(fd)].bigreqEnabled) { \ + printfield (buf, 4, 4, CARD32, "request length"); \ + buf += 4; \ + } else { \ + printfield (buf, 2, 2, CARD16, "request length"); \ + } \ + } while (0) + #endif /* XSCOPE_X11_H */ -- cgit v1.2.1