Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
setting result help to propogate it
[simgrid.git] / src / simix / smx_io.c
index baceaf1..dde44a3 100644 (file)
@@ -5,6 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "smx_private.h"
+#include "surf/storage_private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/dict.h"
@@ -313,8 +314,8 @@ void SIMIX_post_io(smx_action_t action)
       simcall_file_ls__set__result(simcall, (action->io.surf_io)->ls_dict);
       break;
     case SIMCALL_FILE_GET_SIZE:
-      xbt_free(simcall_file_close__get__fd(simcall));
-      simcall_file_close__set__result(simcall, 0);
+      simcall_file_get_size__set__result(simcall,
+          ((action->io.surf_io)->file->size));
       break;
 
     default: