Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert the modules dict, dynar and swag to unit testing
[simgrid.git] / src / msg / msg_config.c
index 0e89502..50cb176 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "private.h"
 #include "xbt/sysdep.h"
-#include "xbt/error.h"
+#include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_cfg, msg,
                                "Configuration support in \ref MSG_API");
@@ -50,6 +50,15 @@ void msg_config_init(void) {
   xbt_cfg_set_string(_msg_cfg_set,"surf_workstation_model", "CLM03");
 }
 
+void msg_config_finalize(void) {
+
+  if (!_msg_init_status) 
+    return; /* Not initialized yet. Nothing to do */
+
+  xbt_cfg_free(&_msg_cfg_set);
+  _msg_init_status = 0;
+}
+
 /** \brief set a configuration variable
  * 
  * Currently existing configuation variable: