From 0bec150ab184903e17702e4d684d35d0d2c88010 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 4 Jul 2011 16:27:23 +0200 Subject: s3: Fix an enum/int mixup Autobuild-User: Volker Lendecke Autobuild-Date: Mon Jul 4 18:47:59 CEST 2011 on sn-devel-104 --- source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'source3/rpc_server') 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; } -- cgit