diff options
author | Volker Lendecke <vl@samba.org> | 2009-01-30 23:44:21 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-01-31 11:09:39 +0100 |
commit | d94e9c802ceddeff93168337b6fc5533db7f2d33 (patch) | |
tree | f38232bdd6402b386b2248793d99cc02eceb68e6 /source3/smbd/process.c | |
parent | b99859b948f31dbe474b6ce0c6cab601e7e7bc56 (diff) | |
download | samba-d94e9c802ceddeff93168337b6fc5533db7f2d33.tar.gz samba-d94e9c802ceddeff93168337b6fc5533db7f2d33.tar.bz2 samba-d94e9c802ceddeff93168337b6fc5533db7f2d33.zip |
Remove the global variable "chain_size"
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r-- | source3/smbd/process.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index d617ef1915..c9fc1fbb6a 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1359,8 +1359,6 @@ static void construct_reply(char *inbuf, int size, size_t unread_bytes, bool enc connection_struct *conn; struct smb_request *req; - chain_size = 0; - if (!(req = talloc(talloc_tos(), struct smb_request))) { smb_panic("could not allocate smb_request"); } @@ -2114,3 +2112,27 @@ void smbd_process(void) exit_server_cleanly(NULL); } + +bool req_is_in_chain(struct smb_request *req) +{ + if (req->vwv != (uint16_t *)(req->inbuf+smb_vwv)) { + /* + * We're right now handling a subsequent request, so we must + * be in a chain + */ + return true; + } + + if (!is_andx_req(req->cmd)) { + return false; + } + + if (req->wct < 2) { + /* + * Okay, an illegal request, but definitely not chained :-) + */ + return false; + } + + return (CVAL(req->vwv+0, 0) != 0xFF); +} |