Second part of bugfix for bug #8335 - file copy aborts with smb2_validate_message_id...
commit3e854564315a7bdc5d9837526a813b2b858e0563
authorJeremy Allison <jra@samba.org>
Fri, 29 Jul 2011 18:17:03 +0000 (29 11:17 -0700)
committerKarolin Seeger <kseeger@samba.org>
Sun, 31 Jul 2011 19:11:43 +0000 (31 21:11 +0200)
treef68feb36fa38a67b3e7c8f73ca5b0423bd07f641
parent9d579ed2398d7f88c9c02076e612eed877d1ec88
Second part of bugfix for bug #8335 - file copy aborts with smb2_validate_message_id: bad message_id

Modify the credit granting algorithm to closer to what I believe
Windows does.

Split up max_credits into 1/16ths, and then scale
the requested credits by how many 16ths have been
currently granted. Less than 1/16th == grant all
requested (100%), scale down as more have been
granted. Never ask for less than 1 if the client
asked for at least 1.
source3/smbd/smb2_server.c