On Fri, Nov 16, 2001 at 07:20:14PM +1100, Ronnie Sahlberg wrote:
> I think I can fix NT Cancel cleanly.
I think I just *did* fix it cleanly with my most recent checkin.
I checked in a change that adds an "smb_saved_info_t" structure,
containing less stuff than a full "smb_info_t" structure (saving some
more memory), and that puts *those* structures into the hash table and
uses information from it, if found, to fill in the automatic
"smb_info_t" variable.
It also doesn't remove the existing "smb_saved_info_t" structure from
the hash table, or allocate a new structure and put it into the hash
table, for NT Cancel requests, so
when dissecting the NT Cancel, the frame-number information for
the original request is in the "smb_info_t" structure;
when dissecting the reply to the cancelled request, the
information for the original request is in the "smb_info_t"
structure.
Still more stuff could be removed from the "smb_saved_info_t" structure;
it only needs to contain "frame_req", "frame_res", and a "void *",
which:
for most requests, would be null;
for NT Transaction requests, would point to a structure that
need contain only the transaction subcommand;
for Transaction2 requests, would point to a structure that
contains the subcommand and the info level (I don't think it
need contain the info count, as that's part of the response
parameters);
for Transaction requests, would point to a structure containing
the subcommand, the transaction subcommand, and the stuff that's
currently in the "smb_request_val" structure;
and the code that handles those types of transaction requests would
allocate those structures and set the pointer to point to them.