A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix non-MC builds
[simgrid.git]
/
src
/
msg
/
msg_io.cpp
diff --git
a/src/msg/msg_io.cpp
b/src/msg/msg_io.cpp
index
7aa6b09
..
a37a312
100644
(file)
--- a/
src/msg/msg_io.cpp
+++ b/
src/msg/msg_io.cpp
@@
-204,6
+204,7
@@
msg_error_t MSG_file_unlink(msg_file_t fd)
msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
msg_host_t attached_host = storage_src->host();
fd->unlink(attached_host);
msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
msg_host_t attached_host = storage_src->host();
fd->unlink(attached_host);
+ delete fd;
return MSG_OK;
}
return MSG_OK;
}
@@
-295,7
+296,7
@@
msg_error_t MSG_file_rcopy (msg_file_t file, msg_host_t host, const char* fullpa
}
}
}
}
- if (
longest_prefix_length > 0
) {
+ if (
storage_dest != nullptr
) {
/* Mount point found, retrieve the host the storage is attached to */
dst_host = storage_dest->host();
}else{
/* Mount point found, retrieve the host the storage is attached to */
dst_host = storage_dest->host();
}else{
@@
-472,10
+473,12
@@
void *MSG_storage_get_data(msg_storage_t storage)
xbt_dict_t MSG_storage_get_content(msg_storage_t storage)
{
std::map<std::string, sg_size_t>* content = storage->content();
xbt_dict_t MSG_storage_get_content(msg_storage_t storage)
{
std::map<std::string, sg_size_t>* content = storage->content();
- xbt_dict_t content_dict = xbt_dict_new_homogeneous(
nullptr
);
+ xbt_dict_t content_dict = xbt_dict_new_homogeneous(
&free
);
for (auto entry : *content) {
for (auto entry : *content) {
- xbt_dict_set(content_dict, entry.first.c_str(), (void*)entry.second, nullptr);
+ sg_size_t* psize = static_cast<sg_size_t*>(malloc(sizeof(sg_size_t)));
+ *psize = entry.second;
+ xbt_dict_set(content_dict, entry.first.c_str(), psize, nullptr);
}
return content_dict;
}
}
return content_dict;
}