diff options
author | Jeremy Allison <jra@samba.org> | 2009-04-30 15:26:43 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-04-30 15:26:43 -0700 |
commit | 8cf78ff55312768d0b454b1d7e0560e04e6296da (patch) | |
tree | 0a2180f063e3bb9872c2565c92075dfb5dccac81 /source3/client/smbspool.c | |
parent | ab4b8c9c0438bc5afca17e3ebf05dde6f98bc0aa (diff) | |
download | samba-8cf78ff55312768d0b454b1d7e0560e04e6296da.tar.gz samba-8cf78ff55312768d0b454b1d7e0560e04e6296da.tar.bz2 samba-8cf78ff55312768d0b454b1d7e0560e04e6296da.zip |
Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions.
This is smaller than it looks, it just fixes a lot of old code.
Next up, ensure all cli_XX functions return NTSTATUS.
Jeremy.
Diffstat (limited to 'source3/client/smbspool.c')
-rw-r--r-- | source3/client/smbspool.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index a276353a87..6b099dbc0b 100644 --- a/source3/client/smbspool.c +++ b/source3/client/smbspool.c @@ -553,7 +553,7 @@ smb_print(struct cli_state * cli, /* I - SMB connection */ char *title, /* I - Title/job name */ FILE * fp) { /* I - File to print */ - int fnum; /* File number */ + uint16_t fnum; /* File number */ int nbytes, /* Number of bytes read */ tbytes; /* Total bytes read */ char buffer[8192], /* Buffer for copy */ @@ -574,8 +574,7 @@ smb_print(struct cli_state * cli, /* I - SMB connection */ * Open the printer device... */ - fnum = cli_open(cli, title, O_RDWR | O_CREAT | O_TRUNC, DENY_NONE); - if (fnum == -1) { + if (!NT_STATUS_IS_OK(cli_open(cli, title, O_RDWR | O_CREAT | O_TRUNC, DENY_NONE, &fnum))) { fprintf(stderr, "ERROR: %s opening remote spool %s\n", cli_errstr(cli), title); return (get_exit_code(cli, cli_nt_error(cli))); |