/[anubis]/anubis/src/net.c
ViewVC logotype

Diff of /anubis/src/net.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by polak, Thu Jan 30 10:41:06 2003 UTC revision 1.2 by gray, Fri Feb 7 23:00:12 2003 UTC
# Line 123  bind_and_listen(char *host, unsigned int Line 123  bind_and_listen(char *host, unsigned int
123          unsigned long inaddr;          unsigned long inaddr;
124          struct sockaddr_in addr;          struct sockaddr_in addr;
125          int true = 1;          int true = 1;
126            
127          memset(&addr, 0, sizeof(addr));          memset(&addr, 0, sizeof(addr));
128          addr.sin_family = AF_INET;          addr.sin_family = AF_INET;
129          addr.sin_port = htons(port);          addr.sin_port = htons(port);
# Line 154  bind_and_listen(char *host, unsigned int Line 154  bind_and_listen(char *host, unsigned int
154          else          else
155                  addr.sin_addr.s_addr = htonl(INADDR_ANY);                  addr.sin_addr.s_addr = htonl(INADDR_ANY);
156    
157          setsockopt (sd, SOL_SOCKET, SO_REUSEADDR, &true, sizeof (true));          setsockopt (sd, SOL_SOCKET, SO_REUSEADDR, &true, sizeof(true));
158            
159          if (bind(sd, (struct sockaddr *)&addr, sizeof(addr)))          if (bind(sd, (struct sockaddr *)&addr, sizeof(addr)))
160                  anubis_error(HARD, _("bind() failed: %s."), strerror(errno));                  anubis_error(HARD, _("bind() failed: %s."), strerror(errno));
161          info(VERBOSE, _("GNU Anubis bound to %s:%u"), inet_ntoa(addr.sin_addr),          info(VERBOSE, _("GNU Anubis bound to %s:%u"), inet_ntoa(addr.sin_addr),

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26