torture: Remove a use of get_my_vnn()
authorVolker Lendecke <vl@samba.org>
Wed, 14 Oct 2015 09:52:24 +0000 (11:52 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 16 May 2016 21:23:53 +0000 (23:23 +0200)
Reduce the use of globals

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon May 16 23:23:53 CEST 2016 on sn-devel-144

source3/torture/msg_source.c

index 293b09952784f2dc450d755b99fbaae9e4578569..c15f24da9e113ca4a946c81a068b9a3d05d4c7fc 100644 (file)
@@ -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;