summaryrefslogtreecommitdiff
path: root/source4/param/loadparm.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-08 23:32:27 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:55 +0100
commit5c6eacdb04cd18d96dc6313c2a6f934925967e79 (patch)
treea594790ba614a4ee6ee473c63635657e602f03d4 /source4/param/loadparm.c
parent5991108c81afa820f811d8520c51d42e9ca0ec49 (diff)
downloadsamba-5c6eacdb04cd18d96dc6313c2a6f934925967e79.tar.gz
samba-5c6eacdb04cd18d96dc6313c2a6f934925967e79.tar.bz2
samba-5c6eacdb04cd18d96dc6313c2a6f934925967e79.zip
r26350: More tests.
(This used to be commit 87799f55d5d85bf9a15a9637143faa32183b181b)
Diffstat (limited to 'source4/param/loadparm.c')
-rw-r--r--source4/param/loadparm.c74
1 files changed, 29 insertions, 45 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 8cdc82c961..8155dce444 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2198,24 +2198,15 @@ struct parm_struct *lp_next_parameter(struct loadparm_context *lp_ctx, int snum,
}
-/***************************************************************************
- Auto-load some home services.
-***************************************************************************/
-
+/**
+ * Auto-load some home services.
+ */
static void lp_add_auto_services(struct loadparm_context *lp_ctx,
const char *str)
{
return;
}
-/***************************************************************************
- Have we loaded a services file yet?
-***************************************************************************/
-
-bool lp_loaded(void)
-{
- return (global_loadparm != NULL);
-}
/***************************************************************************
Unload unused services.
@@ -2255,9 +2246,9 @@ static int lp_destructor(struct loadparm_context *lp_ctx)
return 0;
}
-/***************************************************************************
- Initialise the global parameter structure.
-***************************************************************************/
+/**
+ * Initialise the global parameter structure.
+ */
struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
{
int i;
@@ -2423,10 +2414,11 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
return lp_ctx;
}
-/***************************************************************************
- Load the services array from the services file. Return True on success,
- False on failure.
-***************************************************************************/
+/**
+ * Load the services array from the services file.
+ *
+ * Return True on success, False on failure.
+ */
bool lp_load(TALLOC_CTX *mem_ctx, const char *filename, struct loadparm_context **ret_lp)
{
char *n2;
@@ -2481,18 +2473,18 @@ bool lp_load(TALLOC_CTX *mem_ctx, const char *filename, struct loadparm_context
return bRetval;
}
-/***************************************************************************
- Return the max number of services.
-***************************************************************************/
+/**
+ * Return the max number of services.
+ */
int lp_numservices(struct loadparm_context *lp_ctx)
{
return lp_ctx->iNumServices;
}
-/***************************************************************************
-Display the contents of the services array in human-readable form.
-***************************************************************************/
+/**
+ * Display the contents of the services array in human-readable form.
+ */
void lp_dump(struct loadparm_context *lp_ctx, FILE *f, bool show_defaults,
int maxtoprint)
@@ -2510,10 +2502,9 @@ void lp_dump(struct loadparm_context *lp_ctx, FILE *f, bool show_defaults,
lp_dump_one(f, show_defaults, lp_ctx->services[iService]);
}
-/***************************************************************************
-Display the contents of one service in human-readable form.
-***************************************************************************/
-
+/**
+ * Display the contents of one service in human-readable form.
+ */
void lp_dump_one(FILE *f, bool show_defaults, struct loadparm_service *service)
{
if (service != NULL) {
@@ -2555,9 +2546,9 @@ struct loadparm_service *lp_service(struct loadparm_context *lp_ctx,
}
-/*******************************************************************
- A useful volume label function.
-********************************************************************/
+/**
+ * A useful volume label function.
+ */
const char *volume_label(struct loadparm_service *service)
{
const char *ret = lp_volume(service);
@@ -2567,15 +2558,9 @@ const char *volume_label(struct loadparm_service *service)
}
-/***********************************************************
- If we are PDC then prefer us as DMB
-************************************************************/
-
-bool lp_domain_logons(struct loadparm_context *lp_ctx)
-{
- return (lp_server_role(lp_ctx) == ROLE_DOMAIN_CONTROLLER);
-}
-
+/**
+ * If we are PDC then prefer us as DMB
+ */
const char *lp_printername(struct loadparm_service *service)
{
const char *ret = _lp_printername(service);
@@ -2586,10 +2571,9 @@ const char *lp_printername(struct loadparm_service *service)
}
-/*******************************************************************
- Return the max print jobs per queue.
-********************************************************************/
-
+/**
+ * Return the max print jobs per queue.
+ */
int lp_maxprintjobs(struct loadparm_service *service)
{
int maxjobs = (service != NULL) ? service->iMaxPrintJobs : sDefault.iMaxPrintJobs;