- while(1) {
- m_task_t task = NULL;
- int a;
- a = MSG_task_get(&(task), PORT_22);
- if (a == MSG_OK) {
- INFO1("Received \"%s\" ", MSG_task_get_name(task));
- if(MSG_task_get_data(task)==FINALIZE) {
- MSG_task_destroy(task);
- break;
- }
-
- /* Get the property list of current slave process */
- xbt_dict_t props = MSG_process_get_properties(MSG_process_self());
- xbt_dict_cursor_t cursor=NULL;
- char *key,*data;
-
- /* Print the properties of the process */
- xbt_dict_foreach(props,cursor,key,data) {
- INFO3("Property: %s for process %s has value: %s",key,MSG_process_get_name(MSG_process_self()),data);
- }
-
- /* Try to get a property that does not exist */
- char *noexist=xbt_strdup("UnknownProcessProp");
- const char *value = MSG_process_get_property_value(MSG_process_self(),noexist);
- if ( value == NULL)
- INFO2("Property: %s for process %s is undefined", noexist, MSG_process_get_name(MSG_process_self()));
- else
- INFO3("Property: %s for process %s has value: %s", noexist, MSG_process_get_name(MSG_process_self()), value);
-
- MSG_task_execute(task);
- MSG_task_destroy(task);
- } else {
- INFO0("Hey ?! What's up ? ");
- xbt_assert0(0,"Unexpected behavior");
- }
+ /* Get the property list of current slave process */
+ xbt_dict_t props = MSG_process_get_properties(MSG_process_self());
+ xbt_dict_cursor_t cursor=NULL;
+ char *key,*data;
+
+ /* Print the properties of the process */
+ xbt_dict_foreach(props,cursor,key,data) {
+ INFO3("Property: %s for process %s has value: %s",key,MSG_process_get_name(MSG_process_self()),data);