Skip to content

Commit

Permalink
s3:vfs_glusterfs: make use of lp_parm_substituted_string()
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Ralph Boehme <[email protected]>
  • Loading branch information
metze-samba committed Nov 27, 2019
1 parent f6747cc commit cea386d
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions source3/modules/vfs_glusterfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
const char *service,
const char *user)
{
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
const char *volfile_servers;
const char *volume;
char *logfile;
Expand All @@ -281,14 +283,21 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
ret = -1;
goto done;
}
logfile = lp_parm_talloc_string(tmp_ctx, SNUM(handle->conn), "glusterfs",
"logfile", NULL);
logfile = lp_parm_substituted_string(tmp_ctx,
lp_sub,
SNUM(handle->conn),
"glusterfs",
"logfile",
NULL);

loglevel = lp_parm_int(SNUM(handle->conn), "glusterfs", "loglevel", -1);

volfile_servers = lp_parm_talloc_string(tmp_ctx, SNUM(handle->conn),
"glusterfs", "volfile_server",
NULL);
volfile_servers = lp_parm_substituted_string(tmp_ctx,
lp_sub,
SNUM(handle->conn),
"glusterfs",
"volfile_server",
NULL);
if (volfile_servers == NULL) {
volfile_servers = DEFAULT_VOLFILE_SERVER;
}
Expand Down

0 comments on commit cea386d

Please sign in to comment.