[PATCH] torture: Remove a use of get_my_vnn()

Jeremy Allison jra at samba.org
Mon May 16 17:53:30 UTC 2016


On Mon, May 16, 2016 at 05:01:43PM +0200, Volker Lendecke wrote:
> Hi!
> 
> Review appreciated!

LGTM. Pushed !
> -- 
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de, mailto:kontakt at sernet.de

> From 3c4e3dc2380f06815a747a4360527d416f6920a1 Mon Sep 17 00:00:00 2001
> From: Volker Lendecke <vl at samba.org>
> Date: Wed, 14 Oct 2015 11:52:24 +0200
> Subject: [PATCH] torture: Remove a use of get_my_vnn()
> 
> Reduce the use of globals
> 
> Signed-off-by: Volker Lendecke <vl at samba.org>
> ---
>  source3/torture/msg_source.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/source3/torture/msg_source.c b/source3/torture/msg_source.c
> index 293b099..c15f24d 100644
> --- a/source3/torture/msg_source.c
> +++ b/source3/torture/msg_source.c
> @@ -110,7 +110,7 @@ int main(int argc, const char *argv[])
>  	struct messaging_context *msg_ctx;
>  	struct tevent_req *req;
>  	int ret;
> -	struct server_id id;
> +	struct server_id my_id, id;
>  
>  	if (argc != 2) {
>  		fprintf(stderr, "Usage: %s <dst>\n", argv[0]);
> @@ -130,8 +130,9 @@ int main(int argc, const char *argv[])
>  		perror("messaging_init failed");
>  		return -1;
>  	}
> +	my_id = messaging_server_id(msg_ctx);
>  
> -	id = server_id_from_string(get_my_vnn(), argv[1]);
> +	id = server_id_from_string(my_id.vnn, argv[1]);
>  	if (!procid_valid(&id)) {
>  		fprintf(stderr, "pid %s invalid\n", argv[1]);
>  		return -1;
> -- 
> 1.9.1
> 




More information about the samba-technical mailing list