From: Tim Beale Date: Sun, 6 Jan 2019 23:06:15 +0000 (+1300) Subject: libcli: Add error log if insufficient SMB2 credits X-Git-Tag: samba-4.8.9~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb76511f41355b7d3a8a20b69d86eaeb89ebe0e5;p=thirdparty%2Fsamba.git libcli: Add error log if insufficient SMB2 credits Although it's unusual to hit this case, I was seeing it happen while working on the SMB python bindings. Even with debug level 10, there was nothing coming out to help pin down the source of the NT_STATUS_INTERNAL_ERROR. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13736 Signed-off-by: Tim Beale Reviewed-by: Stefan Metzmacher (cherry picked from commit bf229de7926f12e329cdb3201f68f20ae776fe32) --- diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 3f65216a669..10de278825a 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -3231,6 +3231,9 @@ NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs, avail = MIN(avail, state->conn->smb2.cur_credits); if (avail < charge) { + DBG_ERR("Insufficient credits. " + "%"PRIu64" available, %"PRIu16" needed\n", + avail, charge); return NT_STATUS_INTERNAL_ERROR; }