Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
setting result help to propogate it
authorsuter <frederic.suter@cc.in2p3.fr>
Thu, 6 Jun 2013 19:30:49 +0000 (21:30 +0200)
committersuter <frederic.suter@cc.in2p3.fr>
Thu, 6 Jun 2013 19:30:49 +0000 (21:30 +0200)
src/simix/smx_io.c
src/surf/storage.c

index 08d7da0..dde44a3 100644 (file)
@@ -5,6 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "smx_private.h"
  * 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"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/dict.h"
@@ -313,7 +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:
       simcall_file_ls__set__result(simcall, (action->io.surf_io)->ls_dict);
       break;
     case SIMCALL_FILE_GET_SIZE:
-      simcall_file_get_size__set__result(simcall, 0);
+      simcall_file_get_size__set__result(simcall,
+          ((action->io.surf_io)->file->size));
       break;
 
     default:
       break;
 
     default:
index 271bb0b..5c02fa6 100644 (file)
@@ -84,6 +84,7 @@ static surf_action_t storage_action_ls(void *storage, const char* path)
 static surf_action_t storage_action_get_size(void *storage, surf_file_t stream)
 {
   surf_action_t action = storage_action_execute(storage,0,GET_SIZE);
 static surf_action_t storage_action_get_size(void *storage, surf_file_t stream)
 {
   surf_action_t action = storage_action_execute(storage,0,GET_SIZE);
+  action->file = stream;
   return action;
 }
 
   return action;
 }