* Once we've fixed all callers to call
* tstream_disconnect_send()/_recv(), this will
* never be called.
+ *
+ * We use a maximun timeout of 1 second == 1000 msec.
*/
+ cli_nps->timeout = MIN(cli_nps->timeout, 1000);
+
if (cli_nps->is_smb1) {
status = smb1cli_close(cli_nps->conn,
cli_nps->timeout,
cli_nps->read.buf = talloc_array(cli_nps, uint8_t, received);
if (cli_nps->read.buf == NULL) {
TALLOC_FREE(subreq);
- tevent_req_nomem(cli_nps->read.buf, req);
+ tevent_req_oom(req);
return;
}
memcpy(cli_nps->read.buf, rcvbuf, received);
cli_nps->read.buf = talloc_array(cli_nps, uint8_t, received);
if (cli_nps->read.buf == NULL) {
TALLOC_FREE(subreq);
- tevent_req_nomem(cli_nps->read.buf, req);
+ tevent_req_oom(req);
return;
}
memcpy(cli_nps->read.buf, rcvbuf, received);