lists.arthurdejong.org
RSS feed

cvsd commit: MODIFIED: . ...

[Date Prev][Date Next] [Thread Prev][Thread Next]

cvsd commit: MODIFIED: . ...



User: arthur
Date: 10/08/26 20:59:41

Modified:    . cvsd.c
Log:
simplify error handling of bind() even further


Revision  Changes    Path
1.119     +3 -10     cvsd/cvsd.c

Index: cvsd.c
===================================================================
RCS file: /home/arthur/devel/repos/cvsd/cvsd.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -b -r1.118 -r1.119
--- cvsd.c      25 Aug 2010 21:24:53 -0000      1.118
+++ cvsd.c      26 Aug 2010 18:59:41 -0000      1.119
@@ -459,18 +459,11 @@
     /* bind the socket to the specified port */
     if (bind(sock,addr->ai_addr,addr->ai_addrlen)<0)
     {
-      if (errno==EADDRINUSE)
-      {
         log_log(LOG_DEBUG,"debug: bind() failed (ignored): 
%s",strerror(errno));
         if (close(sock))
           log_log(LOG_WARNING,"problem closing socket (ignored): 
%s",strerror(errno));
         continue;
       }
-      log_log(LOG_ERR,"bind() failed: %s",strerror(errno));
-      if (close(sock))
-        log_log(LOG_WARNING,"problem closing socket: %s",strerror(errno));
-      exit(1);
-    }
 
     /* start listening for connections */
     if (listen(sock,1)<0)


--
To unsubscribe send an email to
cvsd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/cvsd-commits