1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00

param: turn 'preferred master' into a generated function

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Michael Adam
2015-07-21 14:09:35 +02:00
committed by Jeremy Allison
parent 20c84b8d03
commit 217ce6d93b
3 changed files with 5 additions and 4 deletions

View File

@ -2,7 +2,7 @@
context="G"
type="enum"
enumlist="enum_bool_auto"
generated_function="0"
function="_preferred_master"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<synonym>prefered master</synonym>
<description>

View File

@ -252,7 +252,6 @@ enum case_handling {CASE_LOWER,CASE_UPPER};
int iminreceivefile; \
char *szPrintcapname; \
int CupsEncrypt; \
int _preferred_master; \
char *szIdmapUID; \
char *szIdmapGID; \
char *szIdmapBackend; \

View File

@ -4101,10 +4101,12 @@ static bool lp_domain_master_true_or_auto(void)
bool lp_preferred_master(void)
{
if (Globals._preferred_master == Auto)
int preferred_master = lp__preferred_master();
if (preferred_master == Auto)
return (lp_local_master() && lp_domain_master());
return (bool)Globals._preferred_master;
return (bool)preferred_master;
}
/*******************************************************************