summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-07-04 16:27:23 +0200
committerVolker Lendecke <vlendec@samba.org>2011-07-04 18:47:59 +0200
commit0bec150ab184903e17702e4d684d35d0d2c88010 (patch)
treee5e4ecb4aab528531550532bc19573fe9035c9d5 /source3/rpc_server
parent7c96e96e9881ec1ad7b41f0ab241a5b0ac17b93f (diff)
downloadsamba-0bec150ab184903e17702e4d684d35d0d2c88010.tar.gz
samba-0bec150ab184903e17702e4d684d35d0d2c88010.tar.bz2
samba-0bec150ab184903e17702e4d684d35d0d2c88010.zip
s3: Fix an enum/int mixup
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Jul 4 18:47:59 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index 752b857667..7299d4cb77 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -247,18 +247,19 @@ static WERROR net_enum_files(TALLOC_CTX *ctx,
/*******************************************************************
Utility function to get the 'type' of a share from an snum.
********************************************************************/
-static uint32 get_share_type(int snum)
+static enum srvsvc_ShareType get_share_type(int snum)
{
/* work out the share type */
- uint32 type = STYPE_DISKTREE;
-
- if (lp_print_ok(snum))
- type = STYPE_PRINTQ;
- if (strequal(lp_fstype(snum), "IPC"))
- type = STYPE_IPC;
- if (lp_administrative_share(snum))
- type |= STYPE_HIDDEN;
+ enum srvsvc_ShareType type = STYPE_DISKTREE;
+ if (lp_print_ok(snum)) {
+ type = lp_administrative_share(snum)
+ ? STYPE_PRINTQ_HIDDEN : STYPE_PRINTQ;
+ }
+ if (strequal(lp_fstype(snum), "IPC")) {
+ type = lp_administrative_share(snum)
+ ? STYPE_IPC_HIDDEN : STYPE_IPC;
+ }
return type;
}