X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/856060282bcef7e9f575fd1b2d33071afdd58502..2e2ca643ddfa22db6d912fe297d319433217a401:/src/gras/Transport/transport.c diff --git a/src/gras/Transport/transport.c b/src/gras/Transport/transport.c index a8d20523bb..9d66b21e8c 100644 --- a/src/gras/Transport/transport.c +++ b/src/gras/Transport/transport.c @@ -36,7 +36,7 @@ gras_trp_plugin_new(const char *name, gras_trp_setup_t setup) { free(plug->name); free(plug); plug=NULL; - xbt_ex_free(e); + xbt_ex_free(&e); } else { RETHROW; } @@ -168,14 +168,17 @@ void gras_trp_socket_new(int incoming, *dst = sock; - xbt_dynar_push(((gras_trp_procdata_t) gras_libdata_by_id(gras_trp_libdata_id))->sockets,dst); + xbt_dynar_push(((gras_trp_procdata_t) + gras_libdata_by_id(gras_trp_libdata_id))->sockets,dst); XBT_OUT; } /** * @brief Opens a server socket and makes it ready to be listened to. + * @param port: port on which you want to listen * @param buf_size: size of the buffer (in byte) on the socket (for TCP sockets only). If 0, a sain default is used (32k, but may change) + * @param measurement: whether this socket is meant to convey measurement (if you don't know, use 0 to exchange regular messages) * * In real life, you'll get a TCP socket. */ @@ -219,7 +222,10 @@ gras_socket_server_ext(unsigned short port, /** * @brief Opens a client socket to a remote host. + * @param host: who you want to connect to + * @param port: where you want to connect to on this host * @param buf_size: size of the buffer (in bytes) on the socket (for TCP sockets only). If 0, a sain default is used (32k, but may change) + * @param measurement: whether this socket is meant to convey measurement (if you don't know, use 0 to exchange regular messages) * * In real life, you'll get a TCP socket. */ @@ -465,7 +471,8 @@ gras_socket_t gras_socket_meas_accept(gras_socket_t peer){ "No need to accept on non-measurement sockets (it's automatic)"); if (!peer->accepting) { - /* nothing to accept here */ + /* nothing to accept here (must be in SG) */ + /* FIXME: this is BAD! since it makes tricky to free the accepted socket*/ return peer; }