static int bob(int argc, char *argv[])
{
+ /* this host also tests the properties of the AS*/
+ msg_as_t root = MSG_environment_get_routing_root();
+ XBT_INFO("== Print the properties of the AS");
+ XBT_INFO(" Process property: filename -> %s", MSG_environment_as_get_property_value(root, "filename"));
+ XBT_INFO(" Process property: date -> %s", MSG_environment_as_get_property_value(root, "date"));
+ XBT_INFO(" Process property: author -> %s", MSG_environment_as_get_property_value(root, "author"));
+
/* Get the property list of current bob process */
xbt_dict_t props = MSG_process_get_properties(MSG_process_self());
xbt_dict_cursor_t cursor = NULL;
> [ 0.000000] (0:maestro@) Host 'node-2.acme.org' runs at 1000000000 flops/s
> [ 0.000000] (0:maestro@) Host 'node-3.acme.org' runs at 1000000000 flops/s
> [ 0.000000] (0:maestro@) Host 'node-4.acme.org' runs at 1000000000 flops/s
+> [ 0.000000] (2:bob@host1) == Print the properties of the AS
+> [ 0.000000] (2:bob@host1) Process property: filename -> prop.xml
+> [ 0.000000] (2:bob@host1) Process property: date -> 31-08-12
+> [ 0.000000] (2:bob@host1) Process property: author -> pnavarro
> [ 0.000000] (2:bob@host1) == Print the properties of the process
> [ 0.000000] (2:bob@host1) Process property: SomeProp -> SomeValue
> [ 0.000000] (2:bob@host1) == Try to get a process property that does not exist
XBT_DEBUG("Set AS property %s -> %s", A_surfxml_prop_id, A_surfxml_prop_value);
simgrid::s4u::NetZone* netzone = simgrid::s4u::Engine::instance()->netzoneByNameOrNull(A_surfxml_AS_id);
- netzone->setProperty(A_surfxml_prop_id, xbt_strdup(A_surfxml_prop_value));
+ netzone->setProperty(A_surfxml_prop_id, A_surfxml_prop_value);
}
else{
if (!current_property_set)