From: Martin Molnar Date: Mon, 25 May 2009 10:21:25 +0000 (+0200) Subject: fwp_endpoint_create returns socket descriptor X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/fwp.git/commitdiff_plain/785dd9ffd5e6b231b5d2289db228d371c0a744d1 fwp_endpoint_create returns socket descriptor if successfull otherwise negative value. Signed-off-by: Martin --- diff --git a/fwp/lib/frsh_fwp/fwp_fna.c b/fwp/lib/frsh_fwp/fwp_fna.c index ca7a4ab..8f32ca3 100644 --- a/fwp/lib/frsh_fwp/fwp_fna.c +++ b/fwp/lib/frsh_fwp/fwp_fna.c @@ -87,10 +87,8 @@ int fwp_fna_send_endpoint_created(fna_endpoint_data_t *endpoint) port = (unsigned int) endpoint->stream_id; attr = (fwp_endpoint_attr_t*) endpoint->endpoint_protocol_info.send.body; rv = fwp_send_endpoint_create(node, port, attr, &fwp_epoint); - if (rv) - return rv; endpoint->protocol_info.body = fwp_epoint; - return 0; + return rv; } int fwp_fna_receive_endpoint_created(fna_endpoint_data_t *endpoint) diff --git a/fwp/lib/fwp/fwp_endpoint.c b/fwp/lib/fwp/fwp_endpoint.c index ecd6fe7..7173c57 100644 --- a/fwp/lib/fwp/fwp_endpoint.c +++ b/fwp/lib/fwp/fwp_endpoint.c @@ -252,7 +252,7 @@ int fwp_send_endpoint_create(unsigned int node, #endif *epointd = fwp_epoint; - return 0; + return fwp_epoint->sockd; err: fwp_endpoint_destroy(fwp_epoint); return -1;