From: mquinson Date: Tue, 7 Aug 2007 20:14:29 +0000 (+0000) Subject: Yeah, right. We should prevent to push the socket into the dynar in gras_trp_socket_n... X-Git-Tag: v3.3~1332 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a8ee9ffc2584f27805105408cbed642136f1b677 Yeah, right. We should prevent to push the socket into the dynar in gras_trp_socket_new to prevent the listener from using it before it gets ready, but we still should push it one day (wasn't done for accepted sockets nor file sockets) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4028 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/Transport/transport_plugin_file.c b/src/gras/Transport/transport_plugin_file.c index a09864ed16..de41f4d743 100644 --- a/src/gras/Transport/transport_plugin_file.c +++ b/src/gras/Transport/transport_plugin_file.c @@ -103,6 +103,8 @@ gras_socket_client_from_file(const char*path) { res->outgoing?'y':'n', res->accepting?'y':'n'); + xbt_dynar_push(((gras_trp_procdata_t) + gras_libdata_by_id(gras_trp_libdata_id))->sockets,&res); return res; } @@ -143,6 +145,8 @@ gras_socket_t gras_socket_server_from_file(const char*path) { res->accepting?'y':'n'); res->recv_ok=0; + xbt_dynar_push(((gras_trp_procdata_t) + gras_libdata_by_id(gras_trp_libdata_id))->sockets,&res); return res; } diff --git a/src/gras/Transport/transport_plugin_tcp.c b/src/gras/Transport/transport_plugin_tcp.c index ca497c0eff..b8878fdca0 100644 --- a/src/gras/Transport/transport_plugin_tcp.c +++ b/src/gras/Transport/transport_plugin_tcp.c @@ -237,7 +237,9 @@ static gras_socket_t gras_trp_sock_socket_accept(gras_socket_t sock) { } VERB3("Accepted from %s:%d (sd=%d)", res->peer_name,res->peer_port,sd); - + xbt_dynar_push(((gras_trp_procdata_t) + gras_libdata_by_id(gras_trp_libdata_id))->sockets,&res); + XBT_OUT; return res; }