]> rtime.felk.cvut.cz Git - frescor/fwp.git/blobdiff - fwp/lib/fwp/fwp_endpoint.c
Remove unused flags parameter of fwp_send()
[frescor/fwp.git] / fwp / lib / fwp / fwp_endpoint.c
index 7173c57a644a85ef17ad1a53c2756b878d1345ea..8418b5388bb755570be893660c21e6422db13d70 100644 (file)
 #include "fwp_endpoint.h"
 #include "fwp_msgb.h"
 #include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include "fwp_utils.h"
 
 #include <pthread.h>
+#include "fwp_debug.h"
 
 typedef unsigned int fwp_endpoint_id_t;
 
@@ -317,7 +322,7 @@ int fwp_receive_endpoint_create(unsigned int port,
                }
                
                if (listen(fwp_epoint->sockd, fwp_epoint->attr.max_connections)){
-                       perror("Error on listen call\n");
+                       FWP_ERROR("Error on listen call: %s\n", strerror(errno));
                        goto err;
                }
                
@@ -438,7 +443,7 @@ static int fwp_receive_endpoint_accept(fwp_endpoint_t *fwp_epoint)
                        &peer.addrlen);
        
        if (csockd < 0) {
-               perror("Error on accept\n");
+               FWP_ERROR("Error on accept: %s\n", strerror(errno));
                return errno;   
        }               
 
@@ -540,7 +545,6 @@ ssize_t fwp_recv(fwp_endpoint_d_t epointd,
        }
        
        while (1){
-       /* FIXME: What about using a loop here and continue instead of goto???? */
                /* FWP_EPOINT_RELIABLE */
                fdset = fwp_epoint->fdset;
                if (select(FD_SETSIZE, &fdset, (fd_set *)0, 
@@ -576,8 +580,7 @@ ssize_t fwp_recv(fwp_endpoint_d_t epointd,
  * On error, -1 is returned and errno is set appropriately.
  *
  */
-int fwp_send(fwp_endpoint_d_t epointd,const void *msg, const size_t size, 
-               int flags)
+int fwp_send(fwp_endpoint_d_t epointd,const void *msg, const size_t size)
 {
        fwp_endpoint_t *fwp_epoint = epointd;
        struct fwp_msgb *msgb;