Commit Graph

3 Commits

Author SHA1 Message Date
Guy Harris a66e877459 Move "XConvertCase()" from a header file to "packet-x11.c".
Handle the failure reply from the initial connection request.

"proto_item_append_text()" accepts "printf"-like formats; we don't need
to generate a string with a formatting routine and hand it to
"proto_item_append_text()", so don't do so.

When doing reassembly, the length that should be checked is the length
remaining in the tvbuff, not the length remaining in the packet, and
that length should be fetched with "tvb_ensure_length_remaining()" so
that if we *do* go past the end of the tvbuff we throw the appropriate
exception.

To determine whether a reply is a reply to the initial connection, check
the connection state and "initial connection reply" frame - don't check
the first byte of the message unless we've determined that the message
isn't an initial connection reply (the first byte of the initial
connection reply is the success/failure flag, so it could be 0 or 1).

Display window IDs in hex in replies, as we do in requests.

Fix the masks for Button3, Button4, and Button5 (it's a bitset, not a
button number - more than one mouse button can be down in an event,
although it can be a pain to try to click more than one button at the
same time).

svn path=/trunk/; revision=9544
2004-01-04 10:57:18 +00:00
Michael Tüxen dde4d144f3 Make XConvertCase static to avoid a warning at link time.
svn path=/trunk/; revision=9535
2004-01-03 13:03:02 +00:00
Olivier Biot a551259fc2 From Michael Shuldman:
Add support for parsing some X11 replies and events (and
the framework for handling X11 errors it looks like) to the
existing X11 code, which parses X11 requests.

It parses what is the most difficult part of the replies/events,
they Keycode stuff by parsing the Keyboardmapping replies and etc,
and then KeyPress, KeyRelease events and some related stuff (used
for a specific project).

Adding support for parsing the rest of the event/replies should not
be difficult, I think it will mostly consist of going through every
event/reply and add the missing calls for each dataitem i.e.  register
the data, the remaining the eventcodes/replies are pretty
straightforward if I remember correctly.

All events and replies are reported, it's the "detailed" (-V option)
that's missing for most.

The replies, events and errors are listed in the Info column,
and are summarized in the protocol summary line.

Bogus if (tree) { } constructs have also been fixed.

List over other misc. stuff added:
 - handle multiple outstanding requests.
 - add AllocNamedColor to list of requests expecting a reply.
 - body for parsing error replies.
 - each packet can be sent to us multiple times, try to handle that.
 - change request_length display to be what the client actually sends
   for x11_request, not what it means (don't multiply by four).
 - add some more opcodes expecting a reply (gone through all listed
   in the ref. now, so should be complete).
 - use hashtable and sequencenumber for matching reply to request.

svn path=/trunk/; revision=9520
2004-01-02 12:52:45 +00:00