summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-03 15:12:42 -0700
committerJeremy Allison <jra@samba.org>2007-11-03 15:12:42 -0700
commit73d407968002587eadd0ff13eb413ddf07c78771 (patch)
treee1656e24e0298ee3b9097c1904618955535233e4 /source3/include
parent705ba0d5b5156075d841ce120cea967f665f52d6 (diff)
downloadsamba-73d407968002587eadd0ff13eb413ddf07c78771.tar.gz
samba-73d407968002587eadd0ff13eb413ddf07c78771.tar.bz2
samba-73d407968002587eadd0ff13eb413ddf07c78771.zip
Remove the smb_read_error global variable and replace
it with accessor functions. "One global or pstring a day...." :-). Jeremy. (This used to be commit d50d14c300abc83b7015718ec48acc8b3227a273)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/client.h3
-rw-r--r--source3/include/smb.h15
2 files changed, 11 insertions, 7 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index e38017fe7b..d8c35780a4 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -82,7 +82,8 @@ struct rpc_pipe_client {
struct cli_state {
int port;
int fd;
- int smb_rw_error; /* Copy of last read or write error. */
+ /* Copy of last read or write error. */
+ enum smb_read_errors smb_rw_error;
uint16 cnum;
uint16 pid;
uint16 mid;
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 303f7606d3..be339f2e38 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -72,12 +72,15 @@
#include "debug.h"
/* this defines the error codes that receive_smb can put in smb_read_error */
-#define READ_TIMEOUT 1
-#define READ_EOF 2
-#define READ_ERROR 3
-#define WRITE_ERROR 4 /* This error code can go into the client smb_rw_error. */
-#define READ_BAD_SIG 5
-#define DO_NOT_DO_TDIS 6 /* cli_close_connection() check for this when smbfs wants to keep tree connected */
+enum smb_read_errors {
+ SMB_READ_OK = 0,
+ SMB_READ_TIMEOUT,
+ SMB_READ_EOF,
+ SMB_READ_ERROR,
+ SMB_WRITE_ERROR, /* This error code can go into the client smb_rw_error. */
+ SMB_READ_BAD_SIG,
+ SMB_DO_NOT_DO_TDIS /* cli_close_connection() check for this when smbfs wants to keep tree connected */
+};
#define DIR_STRUCT_SIZE 43