From: Frederic Suter Date: Tue, 18 Jul 2017 07:36:48 +0000 (+0200) Subject: Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid X-Git-Tag: v3_17~365^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f12b085d941522c6c45e47db742a7fdfedb832da?hp=43f7ca1cac5ab1858e318fdd6239d0a0c3b3d893 Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid --- diff --git a/include/simgrid/s4u/Storage.hpp b/include/simgrid/s4u/Storage.hpp index 854e0f9ab9..2ece591608 100644 --- a/include/simgrid/s4u/Storage.hpp +++ b/include/simgrid/s4u/Storage.hpp @@ -38,7 +38,7 @@ public: xbt_dict_t getProperties(); const char* getProperty(const char* key); - void setProperty(const char* key, char* value); + void setProperty(const char* key, const char* value); std::map* getContent(); void setUserdata(void* data) { userdata_ = data; } diff --git a/src/s4u/s4u_storage.cpp b/src/s4u/s4u_storage.cpp index f746562730..74770d9ea6 100644 --- a/src/s4u/s4u_storage.cpp +++ b/src/s4u/s4u_storage.cpp @@ -70,7 +70,7 @@ const char* Storage::getProperty(const char* key) return this->pimpl_->getProperty(key); } -void Storage::setProperty(const char* key, char* value) +void Storage::setProperty(const char* key, const char* value) { simgrid::simix::kernelImmediate([this, key, value] { this->pimpl_->setProperty(key, value); }); } diff --git a/teshsuite/s4u/storage_client_server/storage_client_server.cpp b/teshsuite/s4u/storage_client_server/storage_client_server.cpp index 10ea0648e2..db4614c31e 100644 --- a/teshsuite/s4u/storage_client_server/storage_client_server.cpp +++ b/teshsuite/s4u/storage_client_server/storage_client_server.cpp @@ -98,7 +98,7 @@ static void dump_platform_storages() for (auto storage : *storages) { XBT_INFO("Storage %s is attached to %s", storage.first.c_str(), storage.second->getHost()->getCname()); - storage.second->setProperty("other usage", xbt_strdup("gpfs")); + storage.second->setProperty("other usage", "gpfs"); } delete storages; } diff --git a/teshsuite/xbt/parallel_log_crashtest/parallel_log_crashtest.c b/teshsuite/xbt/parallel_log_crashtest/parallel_log_crashtest.c index 76cce8ddd4..ab85f5dac6 100644 --- a/teshsuite/xbt/parallel_log_crashtest/parallel_log_crashtest.c +++ b/teshsuite/xbt/parallel_log_crashtest/parallel_log_crashtest.c @@ -6,6 +6,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "simgrid/msg.h" #include "xbt.h" XBT_LOG_NEW_DEFAULT_CATEGORY(synchro_crashtest, "Logs of this example"); @@ -36,8 +37,6 @@ static int crasher(int argc, char *argv[]) int i; xbt_os_thread_t *crashers; - xbt_init(&argc, argv); - /* initializations of the philosopher mechanisms */ id = xbt_new0(int, crasher_amount); crashers = xbt_new(xbt_os_thread_t, crasher_amount); @@ -64,5 +63,6 @@ static int crasher(int argc, char *argv[]) int main(int argc, char *argv[]) { + MSG_init(&argc, argv); return crasher(argc, argv); }