* \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,
* \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,
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;
}
/**