* Set a string value, deallocating any existing space, and allocing the space
* for the string
*/
-static bool string_set(TALLOC_CTX *mem_ctx, char **dest, const char *src)
+static bool lpcfg_string_set(TALLOC_CTX *mem_ctx, char **dest, const char *src)
{
talloc_free(*dest);
* Set a string value, deallocating any existing space, and allocing the space
* for the string
*/
-static bool string_set_upper(TALLOC_CTX *mem_ctx, char **dest, const char *src)
+static bool lpcfg_string_set_upper(TALLOC_CTX *mem_ctx, char **dest, const char *src)
{
talloc_free(*dest);
}
copy_service(lp_ctx->services[i], &tservice, NULL);
if (name != NULL)
- string_set(lp_ctx->services[i], &lp_ctx->services[i]->szService, name);
+ lpcfg_string_set(lp_ctx->services[i], &lp_ctx->services[i]->szService, name);
return lp_ctx->services[i];
}
/* entry (if/when the 'available' keyword is implemented!). */
/* the printer name is set to the service name. */
- string_set(service, &service->szPrintername, pszPrintername);
- string_set(service, &service->comment, comment);
+ lpcfg_string_set(service, &service->szPrintername, pszPrintername);
+ lpcfg_string_set(service, &service->comment, comment);
service->bBrowseable = default_service->bBrowseable;
/* Printers cannot be read_only. */
service->bRead_only = false;
break;
case P_STRING:
- string_set(pserviceDest,
+ lpcfg_string_set(pserviceDest,
(char **)dest_ptr,
*(char **)src_ptr);
break;
case P_USTRING:
- string_set_upper(pserviceDest,
+ lpcfg_string_set_upper(pserviceDest,
(char **)dest_ptr,
*(char **)src_ptr);
break;
static bool handle_realm(struct loadparm_context *lp_ctx, int unused,
const char *pszParmValue, char **ptr)
{
- string_set(lp_ctx, ptr, pszParmValue);
+ lpcfg_string_set(lp_ctx, ptr, pszParmValue);
talloc_free(lp_ctx->globals->szRealm_upper);
talloc_free(lp_ctx->globals->szRealm_lower);
add_to_file_list(lp_ctx, pszParmValue, fname);
- string_set(lp_ctx, ptr, fname);
+ lpcfg_string_set(lp_ctx, ptr, fname);
if (file_exist(fname))
return pm_process(fname, do_section, do_parameter, lp_ctx);
bool bRetval;
struct loadparm_service *serviceTemp;
- string_set(lp_ctx, ptr, pszParmValue);
+ lpcfg_string_set(lp_ctx, ptr, pszParmValue);
bRetval = false;
const char *pszParmValue, char **ptr)
{
- string_set(lp_ctx, ptr, pszParmValue);
+ lpcfg_string_set(lp_ctx, ptr, pszParmValue);
if (lp_ctx->global) {
return debug_parse_levels(pszParmValue);
}
{
debug_set_logfile(pszParmValue);
if (lp_ctx->global) {
- string_set(lp_ctx, ptr, pszParmValue);
+ lpcfg_string_set(lp_ctx, ptr, pszParmValue);
}
return true;
}
break;
}
case P_STRING:
- string_set(mem_ctx, (char **)parm_ptr, pszParmValue);
+ lpcfg_string_set(mem_ctx, (char **)parm_ptr, pszParmValue);
break;
case P_USTRING:
- string_set_upper(mem_ctx, (char **)parm_ptr, pszParmValue);
+ lpcfg_string_set_upper(mem_ctx, (char **)parm_ptr, pszParmValue);
break;
case P_ENUM: