Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s/TRY/TRYOLD/ I'd like to introduce a TRY macro in the exception mecanism, but this...
[simgrid.git] / src / gras / Transport / transport_plugin_buf.c
index dde6dc8..433fb63 100644 (file)
@@ -98,7 +98,7 @@ gras_trp_buf_setup(gras_trp_plugin_t plug) {
   gras_trp_buf_plug_data_t *data =xbt_new(gras_trp_buf_plug_data_t,1);
 
   XBT_IN;
-  TRY(gras_trp_plugin_get_by_name(gras_if_RL() ? "tcp" : "sg",
+  TRYOLD(gras_trp_plugin_get_by_name(gras_if_RL() ? "tcp" : "sg",
                                  &_buf_super));
   DEBUG1("Derivate a buffer plugin from %s",gras_if_RL() ? "tcp" : "sg");
 
@@ -123,7 +123,7 @@ xbt_error_t gras_trp_buf_socket_client(gras_trp_plugin_t self,
   xbt_error_t errcode;
 
   XBT_IN;
-  TRY(_buf_super->socket_client(_buf_super,sock));
+  TRYOLD(_buf_super->socket_client(_buf_super,sock));
   sock->plugin = self;
   gras_trp_buf_init_sock(sock);
     
@@ -140,7 +140,7 @@ xbt_error_t gras_trp_buf_socket_server(gras_trp_plugin_t self,
   xbt_error_t errcode;
 
   XBT_IN;
-  TRY(_buf_super->socket_server(_buf_super,sock));
+  TRYOLD(_buf_super->socket_server(_buf_super,sock));
   sock->plugin = self;
   gras_trp_buf_init_sock(sock);
   return no_error;
@@ -152,7 +152,7 @@ gras_trp_buf_socket_accept(gras_socket_t  sock,
   xbt_error_t errcode;
       
   XBT_IN;
-  TRY(_buf_super->socket_accept(sock,dst));
+  TRYOLD(_buf_super->socket_accept(sock,dst));
   (*dst)->plugin = sock->plugin;
   gras_trp_buf_init_sock(*dst);
   XBT_OUT;
@@ -217,7 +217,7 @@ gras_trp_buf_chunk_send(gras_socket_t sock,
           data->out.size,size-chunk_pos,size,(int)chunk_pos,chunk);
 
     if (data->out.size == data->buffsize) /* out of space. Flush it */
-      TRY(gras_trp_buf_flush(sock));
+      TRYOLD(gras_trp_buf_flush(sock));
   }
 
   XBT_OUT;
@@ -262,7 +262,7 @@ gras_trp_buf_chunk_recv(gras_socket_t sock,
         data->in.size = -1;
       }
        
-      TRY(_buf_super->chunk_recv(sock, data->in.data, data->in.size));
+      TRYOLD(_buf_super->chunk_recv(sock, data->in.data, data->in.size));
        
       if (gras_if_RL()) {
         data->in.pos=0;
@@ -319,7 +319,7 @@ gras_trp_buf_flush(gras_socket_t sock) {
         gras_socket_peer_name(sock),gras_socket_peer_port(sock));
   if (gras_if_RL()) {
      size = (int)htonl(size);
-     TRY(_buf_super->chunk_send(sock,(char*) &size, 4));
+     TRYOLD(_buf_super->chunk_send(sock,(char*) &size, 4));
   } else {
      memcpy(data->out.data, &size, 4);
   }
@@ -327,7 +327,7 @@ gras_trp_buf_flush(gras_socket_t sock) {
 
   DEBUG3("Send the chunk (size=%d) to %s:%d",data->out.size,
         gras_socket_peer_name(sock),gras_socket_peer_port(sock));
-  TRY(_buf_super->chunk_send(sock, data->out.data, data->out.size));
+  TRYOLD(_buf_super->chunk_send(sock, data->out.data, data->out.size));
   VERB1("Chunk sent (size=%d)",data->out.size);
   if (XBT_LOG_ISENABLED(trp_buf,xbt_log_priority_debug))
      hexa_print("chunck sent    ",data->out.data,data->out.size);