From: Michal Sojka Date: Fri, 27 Nov 2009 07:40:52 +0000 (+0100) Subject: Creation of receive endpoint returns socket X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/fwp.git/commitdiff_plain/5d6606374672b1655363ecc0b754ee25952c9ddb Creation of receive endpoint returns socket We need this for ffmpeg integration --- diff --git a/fwp/lib/fwp/fwp_endpoint.c b/fwp/lib/fwp/fwp_endpoint.c index 6c2bf68..fb91688 100644 --- a/fwp/lib/fwp/fwp_endpoint.c +++ b/fwp/lib/fwp/fwp_endpoint.c @@ -179,7 +179,7 @@ int fwp_endpoint_attr_init(fwp_endpoint_attr_t *attr) * \param[in] attr Endpoint attributes * \param[out] epp Pointer to the descriptor of newly created endpoint * - * \return Zero on success, -1 on error and sets errno appropriately. + * \return Non-negative number on success, -1 on error and sets errno appropriately. * */ int fwp_send_endpoint_create(unsigned int node, @@ -276,7 +276,7 @@ err: * \param[in] attr Endpoint attributes * \param[out] epointdp Pointer to the descriptor of newly created endpoint * - * \return Zero on success, -1 on error and errno is set. + * \return Non-negative number on success, -1 on error and errno is set. */ int fwp_receive_endpoint_create(unsigned int port, fwp_endpoint_attr_t *attr, @@ -377,10 +377,10 @@ int fwp_receive_endpoint_create(unsigned int port, fwp_epoint->port = ntohs(addr->sin_port); FWP_DEBUG("Recv port= %d\n",ntohs(addr->sin_port)); *epp = fwp_epoint; - return 0; + return fwp_epoint->sockd; err: fwp_endpoint_destroy(fwp_epoint); - return errno; + return -1; } /**