Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sanitize the log channels naming scheme in GRAS too
[simgrid.git] / src / gras / Transport / transport_plugin_tcp.c
index b360df0..0d23396 100644 (file)
@@ -26,7 +26,7 @@
 #define MIN(a,b) ((a)<(b)?(a):(b))
 #endif
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(trp_tcp,transport,
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_trp_tcp,gras_trp,
       "TCP buffered transport");
 
 /***
@@ -306,7 +306,8 @@ gras_trp_tcp_recv_withbuffer(gras_socket_t sock,
       bufsize -= status;
       got     += status;
     } else {
-      THROW0(system_error,0,"Socket closed by remote side");
+      THROW1(system_error,0,"Socket closed by remote side (got %d bytes before this)",
+            got);
     }
   }
   return got;
@@ -338,7 +339,7 @@ gras_trp_bufiov_flush(gras_socket_t sock) {
   
   DEBUG0("Flush");
   if (data->out == buffering_buf) {
-    if (XBT_LOG_ISENABLED(trp_tcp,xbt_log_priority_debug))
+    if (XBT_LOG_ISENABLED(gras_trp_tcp,xbt_log_priority_debug))
       hexa_print("chunk to send ",
                 (unsigned char *) data->out_buf.data,data->out_buf.size);
     if ((data->out_buf.size - data->out_buf.pos) != 0) {