X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f4ed74ca6d4a744d2956a4f2906c897e1886cefd..7ad85b03568dabade546f7948aaf7279059e9269:/src/simix/smx_vm.c diff --git a/src/simix/smx_vm.c b/src/simix/smx_vm.c index a2e9831b83..d430a960fb 100644 --- a/src/simix/smx_vm.c +++ b/src/simix/smx_vm.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2014. The SimGrid Team. +/* Copyright (c) 2007-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -24,13 +24,13 @@ sg_host_t SIMIX_vm_create(const char *name, sg_host_t ind_phys_host) { /* Create surf associated resource */ surf_vm_model_create(name, ind_phys_host); - - SIMIX_host_create(name); + sg_host_t host = sg_host_by_name(name); + SIMIX_host_create(host); /* We will be able to register the VM to its physical host, so that we can promptly * retrieve the list VMs on the physical host. */ - return sg_host_by_name(name); + return host; }