- MSG_process_sleep(1);
- MSG_task_send(MSG_task_create("release", 0, 1000, NULL),
- "coordinator");
+ XBT_INFO("Client (%s) got the answer (grant). Sleep a bit and release it", my_mailbox);
+
+ if(!strcmp(my_mailbox, "1"))
+ cs = 1;
+
+ /*MSG_process_sleep(my_pid);
+ MSG_task_send(MSG_task_create("release", 0, 1000, NULL),
+ "coordinator");
+ XBT_INFO("Client (%s) releases the CS", my_mailbox);
+
+ if(!strcmp(my_mailbox, "1"))
+ cs = 0;*/
+
+ }else{
+
+ XBT_INFO("Client (%s) got the answer (not grant). Try again", my_mailbox);
+
+ }
+
+ MSG_task_destroy(answer);
+