Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
And now, use the correct syntax for default values in variable substitution
[simgrid.git] / src / gras / Transport / transport_plugin_sg.c
index 68731aa..6dbb7c9 100644 (file)
@@ -58,7 +58,7 @@ typedef struct {
  ***/
 static void find_port(gras_hostdata_t *hd, int port,
                      gras_sg_portrec_t *hpd) {
-  int cpt;
+  unsigned int cpt;
   gras_sg_portrec_t pr;
 
   xbt_assert0(hd,"Please run gras_process_init on each process");
@@ -208,7 +208,7 @@ void gras_trp_sg_socket_server(gras_trp_plugin_t self,
 
 void gras_trp_sg_socket_close(gras_socket_t sock){
   gras_hostdata_t *hd=(gras_hostdata_t *)SIMIX_host_get_data(SIMIX_host_self());
-  int cpt;
+  unsigned int cpt;
   gras_sg_portrec_t pr; 
 
   XBT_IN1(" (sock=%p)",sock);
@@ -306,9 +306,8 @@ void gras_trp_sg_chunk_send_raw(gras_socket_t sock,
   act = SIMIX_action_communicate(SIMIX_host_self(), sock_data->to_host,
                                 name, size, -1);
   SIMIX_register_action_to_condition(act,sock_data->cond);
-  SIMIX_register_condition_to_action(act,sock_data->cond);
-
   SIMIX_cond_wait(sock_data->cond,sock_data->mutex);
+  SIMIX_unregister_action_to_condition(act,sock_data->cond);
   /* error treatmeant (FIXME)*/
 
   /* cleanup structures */