Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
If it is a win plateform we have to use wenvironment against environment.
[simgrid.git] / src / gras / Transport / transport_plugin_tcp.c
index ddbf0f8..114af0c 100644 (file)
@@ -1,8 +1,7 @@
-/* $Id$ */
-
 /* buf trp (transport) - buffered transport using the TCP one               */
 
-/* Copyright (c) 2004 Martin Quinson. All rights reserved.                  */
+/* Copyright (c) 2004, 2005, 2006, 2007, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -225,7 +224,7 @@ static gras_socket_t gras_trp_sock_socket_accept(gras_socket_t sock)
   res->plugin = sock->plugin;
   res->incoming = sock->incoming;
   res->outgoing = sock->outgoing;
-  res->is_master = 0;
+  res->accepting = 0;
   res->sd = sd;
   res->port = -1;
 
@@ -266,10 +265,8 @@ static void gras_trp_sock_socket_close(gras_socket_t sock)
 
   VERB1("close tcp connection %d", sock->sd);
 
-  if (tcp_close(sock->sd) < 0) {
-    WARN3("error while closing tcp socket %d: %d (%s)\n",
-          sock->sd, sock_errno, sock_errstr(sock_errno));
-  }
+  /* ask the listener to close the socket */
+  gras_msg_listener_close_socket(sock->sd);
 }
 
 /************************************/