[BACK]Return to listen.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / aucat

Diff for /src/usr.bin/aucat/Attic/listen.c between version 1.14 and 1.15

version 1.14, 2011/04/28 06:19:57 version 1.15, 2011/05/02 22:24:23
Line 21 
Line 21 
 #include <sys/un.h>  #include <sys/un.h>
   
 #include <netinet/in.h>  #include <netinet/in.h>
   #include <netinet/tcp.h>
 #include <netdb.h>  #include <netdb.h>
   
 #include <err.h>  #include <err.h>
Line 175 
Line 176 
         struct listen *f = (struct listen *)file;          struct listen *f = (struct listen *)file;
         struct sockaddr caddr;          struct sockaddr caddr;
         socklen_t caddrlen;          socklen_t caddrlen;
         int sock;          int sock, opt;
   
         if (pfd->revents & POLLIN) {          if (pfd->revents & POLLIN) {
                 caddrlen = sizeof(caddrlen);                  caddrlen = sizeof(caddrlen);
Line 189 
Line 190 
                         perror("fcntl(sock, O_NONBLOCK)");                          perror("fcntl(sock, O_NONBLOCK)");
                         close(sock);                          close(sock);
                         return 0;                          return 0;
                   }
                   if (f->path == NULL) {
                           opt = 1;
                           if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
                                   &opt, sizeof(int)) < 0) {
                                   perror("setsockopt");
                                   close(sock);
                                   return 0;
                           }
                 }                  }
                 if (sock_new(&sock_ops, sock) == NULL) {                  if (sock_new(&sock_ops, sock) == NULL) {
                         close(sock);                          close(sock);

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15