mirror of
https://github.com/samba-team/samba.git
synced 2025-11-14 12:23:52 +03:00
converted smbd to use NTSTATUS by default
major changes include: - added NSTATUS type - added automatic mapping between dos and nt error codes - changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT() these calls auto-translate to the client error code system - got rid of the cached error code and the writebmpx code We eventually will need to also: - get rid of BOOL, so we don't lose error info - replace all ERROR_DOS() calls with ERROR_NT() calls but that is too much for one night
This commit is contained in:
@@ -412,20 +412,25 @@ BOOL cli_receive_nt_trans(struct cli_state *cli,
|
||||
total_param = SVAL(cli->inbuf,smb_ntr_TotalParameterCount);
|
||||
|
||||
/* allocate it */
|
||||
tdata = Realloc(*data,total_data);
|
||||
if (!tdata) {
|
||||
DEBUG(0,("cli_receive_nt_trans: failed to enlarge buffer"));
|
||||
return False;
|
||||
if (total_data) {
|
||||
tdata = Realloc(*data,total_data);
|
||||
if (!tdata) {
|
||||
DEBUG(0,("cli_receive_nt_trans: failed to enlarge data buffer to %d\n",total_data));
|
||||
return False;
|
||||
} else {
|
||||
*data = tdata;
|
||||
}
|
||||
}
|
||||
else
|
||||
*data = tdata;
|
||||
tparam = Realloc(*param,total_param);
|
||||
if (!tparam) {
|
||||
DEBUG(0,("cli_receive_nt_trans: failed to enlarge buffer"));
|
||||
return False;
|
||||
|
||||
if (total_param) {
|
||||
tparam = Realloc(*param,total_param);
|
||||
if (!tparam) {
|
||||
DEBUG(0,("cli_receive_nt_trans: failed to enlarge param buffer to %d\n", total_param));
|
||||
return False;
|
||||
} else {
|
||||
*param = tparam;
|
||||
}
|
||||
}
|
||||
else
|
||||
*param = tparam;
|
||||
|
||||
while (1) {
|
||||
this_data = SVAL(cli->inbuf,smb_ntr_DataCount);
|
||||
|
||||
Reference in New Issue
Block a user