return NULL;
}
- if (smbXcli_conn_protocol(c->conn) >= PROTOCOL_SMB2_02) {
- /* Ensure we ask for some initial credits. */
- smb2cli_conn_set_max_credits(c->conn, DEFAULT_SMB2_MAX_CREDITS);
+ status = cli_state_update_after_negprot(c);
+ if (!NT_STATUS_IS_OK(status)) {
+ cli_shutdown(c);
+ errno = ENOMEM;
+ return NULL;
}
username_used = *pp_username;