From 3a7d372e2eb5ab00986aafe69ac715a68faa077f Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Wed, 8 Jul 2009 16:22:44 -0700 Subject: s3: Change the share_mode_lock struct to store a base_name and stream_name --- source3/utils/status.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/status.c b/source3/utils/status.c index cbf0dcb2b5..fa7d1eba2b 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -191,7 +191,7 @@ static void print_brl(struct file_id id, }; const char *desc="X"; const char *sharepath = ""; - const char *fname = ""; + char *fname = NULL; struct share_mode_lock *share_mode; if (count==0) { @@ -201,10 +201,19 @@ static void print_brl(struct file_id id, } count++; - share_mode = fetch_share_mode_unlocked(NULL, id, "__unspecified__", "__unspecified__"); + share_mode = fetch_share_mode_unlocked(NULL, id); if (share_mode) { - sharepath = share_mode->servicepath; - fname = share_mode->filename; + bool has_stream = share_mode->stream_name != NULL; + + fname = talloc_asprintf(NULL, "%s%s%s", share_mode->base_name, + has_stream ? ":" : "", + has_stream ? share_mode->stream_name : + ""); + } else { + fname = talloc_strdup(NULL, ""); + if (fname == NULL) { + return; + } } for (i=0;i