msg_host_t attached_host = MSG_host_by_name(storage_priv_src->hostname);
read_size = simcall_file_read(file_priv->simdata->smx_file, size, attached_host);
- if(strcmp(storage_priv_src->hostname, MSG_host_get_name(MSG_host_self()))){
+ if (strcmp(storage_priv_src->hostname, MSG_host_self()->cname())) {
/* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", storage_priv_src->hostname, read_size);
msg_host_t *m_host_list = nullptr;
xbt_free(m_host_list);
if(transfer != MSG_OK){
if (transfer == MSG_HOST_FAILURE)
- XBT_WARN("Transfer error, %s remote host just turned off!", MSG_host_get_name(attached_host));
+ XBT_WARN("Transfer error, %s remote host just turned off!", attached_host->cname());
if (transfer == MSG_TASK_CANCELED)
XBT_WARN("Transfer error, task has been canceled!");
msg_storage_priv_t storage_priv_src = MSG_storage_priv(storage_src);
msg_host_t attached_host = MSG_host_by_name(storage_priv_src->hostname);
- if(strcmp(storage_priv_src->hostname, MSG_host_get_name(MSG_host_self()))){
+ if (strcmp(storage_priv_src->hostname, MSG_host_self()->cname())) {
/* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", storage_priv_src->hostname, size);
msg_host_t *m_host_list = nullptr;
free(m_host_list);
if(transfer != MSG_OK){
if (transfer == MSG_HOST_FAILURE)
- XBT_WARN("Transfer error, %s remote host just turned off!", MSG_host_get_name(attached_host));
+ XBT_WARN("Transfer error, %s remote host just turned off!", attached_host->cname());
if (transfer == MSG_TASK_CANCELED)
XBT_WARN("Transfer error, task has been canceled!");
priv->simdata->smx_file = simcall_file_open(fullpath, MSG_host_self());
priv->desc_id = __MSG_host_get_file_descriptor_id(MSG_host_self());
- name = bprintf("%s:%s:%d", priv->fullpath, MSG_host_get_name(MSG_host_self()), priv->desc_id);
+ name = bprintf("%s:%s:%d", priv->fullpath, MSG_host_self()->cname(), priv->desc_id);
xbt_lib_set(file_lib, name, MSG_FILE_LEVEL, priv);
msg_file_t fd = static_cast<msg_file_t>(xbt_lib_get_elm_or_null(file_lib, name));
xbt_free(priv->data);
int res = simcall_file_close(priv->simdata->smx_file, MSG_host_self());
- name = bprintf("%s:%s:%d", priv->fullpath, MSG_host_get_name(MSG_host_self()), priv->desc_id);
+ name = bprintf("%s:%s:%d", priv->fullpath, MSG_host_self()->cname(), priv->desc_id);
__MSG_host_release_file_descriptor_id(MSG_host_self(), priv->desc_id);
xbt_lib_unset(file_lib, name, MSG_FILE_LEVEL, 1);
xbt_free(name);
host_name_dest = (char*)storage_dest_priv->hostname;
host_dest = MSG_host_by_name(host_name_dest);
}else{
- XBT_WARN("Can't find mount point for '%s' on destination host '%s'", fullpath, sg_host_get_name(host));
+ XBT_WARN("Can't find mount point for '%s' on destination host '%s'", fullpath, host->cname());
return MSG_TASK_CANCELED;
}
* \param storage a storage
* \param name a property name
* \param value what to change the property to
- * \param free_ctn the freeing function to use to kill the value on need
*/
-void MSG_storage_set_property_value(msg_storage_t storage, const char *name, char *value,void_f_pvoid_t free_ctn) {
- xbt_dict_set(MSG_storage_get_properties(storage), name, value,free_ctn);
+void MSG_storage_set_property_value(msg_storage_t storage, const char* name, char* value)
+{
+ xbt_dict_set(MSG_storage_get_properties(storage), name, value, nullptr);
}
/** \ingroup m_storage_management