Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Read smpi_process_count() from remote process
[simgrid.git] / src / mc / mc_protocol.c
index 405a61a..2815033 100644 (file)
@@ -39,7 +39,7 @@ int MC_protocol_hello(int socket)
 {
   int e;
   if ((e = MC_protocol_send_simple_message(socket, MC_MESSAGE_HELLO)) != 0) {
-    XBT_ERROR("Could not send HELLO message: %s", strerror(e));
+    XBT_ERROR("Could not send HELLO message");
     return 1;
   }
 
@@ -51,7 +51,7 @@ int MC_protocol_hello(int socket)
     if (errno == EINTR)
       continue;
     else {
-      XBT_ERROR("Could not receive HELLO message: %s", strerror(errno));
+      XBT_ERROR("Could not receive HELLO message");
       return 2;
     }
   }
@@ -62,3 +62,8 @@ int MC_protocol_hello(int socket)
 
   return 0;
 }
+
+ssize_t MC_receive_message(int socket, void* message, size_t size)
+{
+  return recv(socket, message, size, 0);
+}