Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
hexa_str prototype changed to allow right-to-left display (for little endian pointers)
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 22 Aug 2006 22:12:58 +0000 (22:12 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 22 Aug 2006 22:12:58 +0000 (22:12 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2727 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/Transport/transport_plugin_tcp.c
src/portable.h

index b92dccc..bf76ad7 100644 (file)
@@ -318,7 +318,7 @@ gras_trp_tcp_recv_withbuffer(gras_socket_t sock,
     
     DEBUG5("read(%d, %p, %ld) got %d so far (%s)",
          sock->sd, data+got, bufsize, got,
-         hexa_str((unsigned char*)data,got));
+         hexa_str((unsigned char*)data,got,0));
     status = tcp_read(sock->sd, data+got, (size_t)bufsize);
     
     if (status < 0) {
@@ -328,7 +328,7 @@ gras_trp_tcp_recv_withbuffer(gras_socket_t sock,
             sock_errstr,
             got);
     }
-    DEBUG2("Got %d more bytes (%s)",status,hexa_str((unsigned char*)data+got,status));
+    DEBUG2("Got %d more bytes (%s)",status,hexa_str((unsigned char*)data+got,status,0));
     
     if (status) {
       bufsize -= status;
@@ -422,14 +422,14 @@ gras_trp_buf_send(gras_socket_t sock,
           (int)data->out_buf.size,
           ((int)data->out_buf.size) + thissize -1,
           size,
-          hexa_str((unsigned char*)chunk,thissize));
+          hexa_str((unsigned char*)chunk,thissize,0));
 
     memcpy(data->out_buf.data + data->out_buf.size, chunk + chunk_pos, thissize);
 
     data->out_buf.size += thissize;
     chunk_pos      += thissize;
     DEBUG4("New pos = %d; Still to send = %ld of %ld; ctn sofar=(%s)",
-          data->out_buf.size,size-chunk_pos,size,hexa_str((unsigned char*)chunk,chunk_pos));
+          data->out_buf.size,size-chunk_pos,size,hexa_str((unsigned char*)chunk,chunk_pos,0));
 
     if (data->out_buf.size == data->buffsize) /* out of space. Flush it */
       gras_trp_bufiov_flush(sock);
@@ -473,7 +473,7 @@ gras_trp_buf_recv(gras_socket_t sock,
     data->in_buf.pos += thissize;
     chunk_pos        += thissize;
     DEBUG4("New pos = %d; Still to receive = %ld of %ld. Ctn so far=(%s)",
-          data->in_buf.pos,size - chunk_pos,size,hexa_str((unsigned char*)chunk,chunk_pos));
+          data->in_buf.pos,size - chunk_pos,size,hexa_str((unsigned char*)chunk,chunk_pos,0));
   }
 
   XBT_OUT;
@@ -498,7 +498,7 @@ gras_trp_iov_send(gras_socket_t sock,
     
 
   DEBUG1("Buffer one chunk to be sent later (%s)",
-       hexa_str((char*)chunk,size));
+       hexa_str((char*)chunk,size,0));
 
   elm.iov_len = (size_t)size;
 
index b227f89..835de98 100644 (file)
@@ -189,6 +189,6 @@ extern int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap);
  **** Some debugging functions. Can't we find a better place for this??
  ****/
 void hexa_print(const char*name, unsigned char *data, int size);
-const char *hexa_str(unsigned char *data, int size);
+const char *hexa_str(unsigned char *data, int size, int downside);
 
 #endif /* GRAS_PORTABLE_H */