This code is very old, and has some code styles that we have not used
in Samba for a very long time. This fixes up a the extra braces around
return values.
Andrew Bartlett
i = add_a_service(ServicePtrs[iDefaultService], pszHomename);
if (i < 0)
i = add_a_service(ServicePtrs[iDefaultService], pszHomename);
if (i < 0)
if (!(*(ServicePtrs[iDefaultService]->szPath))
|| strequal(ServicePtrs[iDefaultService]->szPath, lp_pathname(GLOBAL_SECTION_SNUM))) {
if (!(*(ServicePtrs[iDefaultService]->szPath))
|| strequal(ServicePtrs[iDefaultService]->szPath, lp_pathname(GLOBAL_SECTION_SNUM))) {
DEBUG(3, ("adding home's share [%s] for user '%s' at '%s'\n", pszHomename,
user, ServicePtrs[i]->szPath ));
DEBUG(3, ("adding home's share [%s] for user '%s' at '%s'\n", pszHomename,
user, ServicePtrs[i]->szPath ));
}
/***************************************************************************
}
/***************************************************************************
int i = add_a_service(&sDefault, ipc_name);
if (i < 0)
int i = add_a_service(&sDefault, ipc_name);
if (i < 0)
if (asprintf(&comment, "IPC Service (%s)",
Globals.szServerString) < 0) {
if (asprintf(&comment, "IPC Service (%s)",
Globals.szServerString) < 0) {
}
string_set(&ServicePtrs[i]->szPath, tmpdir());
}
string_set(&ServicePtrs[i]->szPath, tmpdir());
DEBUG(3, ("adding IPC service\n"));
SAFE_FREE(comment);
DEBUG(3, ("adding IPC service\n"));
SAFE_FREE(comment);
}
/***************************************************************************
}
/***************************************************************************
int i = add_a_service(ServicePtrs[iDefaultService], pszPrintername);
if (i < 0)
int i = add_a_service(ServicePtrs[iDefaultService], pszPrintername);
if (i < 0)
/* note that we do NOT default the availability flag to true - */
/* we take it from the default service passed. This allows all */
/* note that we do NOT default the availability flag to true - */
/* we take it from the default service passed. This allows all */
DEBUG(3, ("adding printer service %s\n", pszPrintername));
DEBUG(3, ("adding printer service %s\n", pszPrintername));
if (strchr(pszParmName, ':') == NULL) {
DEBUG(0, ("Ignoring unknown parameter \"%s\"\n",
pszParmName));
if (strchr(pszParmName, ':') == NULL) {
DEBUG(0, ("Ignoring unknown parameter \"%s\"\n",
pszParmName));
? &Globals.param_opt : &ServicePtrs[snum]->param_opt;
set_param_opt(opt_list, pszParmName, pszParmValue, 0);
? &Globals.param_opt : &ServicePtrs[snum]->param_opt;
set_param_opt(opt_list, pszParmName, pszParmValue, 0);
}
/* if it's already been set by the command line, then we don't
}
/* if it's already been set by the command line, then we don't
DEBUG(0,
("Global parameter %s found in service section!\n",
pszParmName));
DEBUG(0,
("Global parameter %s found in service section!\n",
pszParmName));
}
parm_ptr = lp_local_ptr_by_snum(snum, &parm_table[parmnum]);
}
}
parm_ptr = lp_local_ptr_by_snum(snum, &parm_table[parmnum]);
}
}
/***************************************************************************
}
/***************************************************************************
void *userdata)
{
if (!bInGlobalSection && bGlobalOnly)
void *userdata)
{
if (!bInGlobalSection && bGlobalOnly)
DEBUGADD(4, ("doing parameter %s = %s\n", pszParmName, pszParmValue));
DEBUGADD(4, ("doing parameter %s = %s\n", pszParmName, pszParmValue));
}
/***************************************************************************
}
/***************************************************************************
/* check for multiple global sections */
if (bInGlobalSection) {
DEBUG(3, ("Processing section \"[%s]\"\n", pszSectionName));
/* check for multiple global sections */
if (bInGlobalSection) {
DEBUG(3, ("Processing section \"[%s]\"\n", pszSectionName));
}
if (!bInGlobalSection && bGlobalOnly)
}
if (!bInGlobalSection && bGlobalOnly)
/* if we have a current service, tidy it up before moving on */
bRetval = true;
/* if we have a current service, tidy it up before moving on */
bRetval = true;
iServiceIndex = add_a_service(&sDefault, pszSectionName);
if (iServiceIndex < 0) {
DEBUG(0, ("Failed to add a new service\n"));
iServiceIndex = add_a_service(&sDefault, pszSectionName);
if (iServiceIndex < 0) {
DEBUG(0, ("Failed to add a new service\n"));
}
/* Clean all parametric options for service */
/* They will be added during parsing again */
free_param_opts(&ServicePtrs[iServiceIndex]->param_opt);
}
}
/* Clean all parametric options for service */
/* They will be added during parsing again */
free_param_opts(&ServicePtrs[iServiceIndex]->param_opt);
}