/* Yeah, the following is awfull, breaking the encapsulation of at least 3 modules
* at the same time, but I'm tracking this bug since too long now, I want it dead. now.
/* Yeah, the following is awfull, breaking the encapsulation of at least 3 modules
* at the same time, but I'm tracking this bug since too long now, I want it dead. now.
@@ -41,11+40,17 @@ int gras_socket_im_the_server(gras_socket_t sock) {
smx_process_t server_listener_process=NULL;
smx_process_t client_listener_process = NULL;
smx_process_t server_listener_process=NULL;
smx_process_t client_listener_process = NULL;
+ XBT_VERB("Am I the server of socket %p (client = %p, server = %p) ? process self: %p", sock, sock_data->client, sock_data->server, SIMIX_process_self());
- if (sock_data->server == SIMIX_process_self())
+ if (sock_data->server == SIMIX_process_self()) {
+ XBT_VERB("I am the server");
return 1;
return 1;
- if (sock_data->client == SIMIX_process_self())
+ }
+ if (sock_data->client == SIMIX_process_self()) {
+ XBT_VERB("I am the client");
return 0;
return 0;
+ }
+ XBT_VERB("I am neither the client nor the server, probably a listener");
/* neither the client nor the server. Check their respective listeners */