Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Remove sg_platf_storage_type_cb
[simgrid.git] / src / simix / smx_vm.c
index a2e9831..d430a96 100644 (file)
@@ -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;
 }