s3: Fix an enum/int mixup
authorVolker Lendecke <vl@samba.org>
Mon, 4 Jul 2011 14:27:23 +0000 (16:27 +0200)
committerVolker Lendecke <vlendec@samba.org>
Mon, 4 Jul 2011 16:47:59 +0000 (18:47 +0200)
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jul  4 18:47:59 CEST 2011 on sn-devel-104

source3/rpc_server/srvsvc/srv_srvsvc_nt.c

index 752b85766761c457faffce7c1922ce6db488d445..7299d4cb77799b4eb7faf1e278876accbc3497a7 100644 (file)
@@ -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;
 }