Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add MSG_storage_set_property_value function
authorPierre Veyre <pierre.veyre@cc.in2p3.fr>
Tue, 24 Sep 2013 09:23:17 +0000 (11:23 +0200)
committerPierre Veyre <pierre.veyre@cc.in2p3.fr>
Tue, 24 Sep 2013 09:23:17 +0000 (11:23 +0200)
src/msg/msg_io.c

index ed88e74..24147ac 100644 (file)
@@ -242,6 +242,18 @@ xbt_dict_t MSG_storage_get_properties(msg_storage_t storage)
   return (simcall_storage_get_properties(storage));
 }
 
+/** \ingroup msg_storage_management
+ * \brief Change the value of a given storage property
+ *
+ * \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);
+}
+
 /** \ingroup msg_storage_management
  * \brief Finds a msg_storage_t using its name.
  * \param name the name of a storage