cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net AprEndpoint.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net AprEndpoint.java

Jean-Frederic Clere-4
jfclere     2005/07/14 15:35:21

  Modified:    util/java/org/apache/tomcat/util/net AprEndpoint.java
  Log:
  throw an exception if listen or bind fails.
 
  Revision  Changes    Path
  1.64      +6 -2      jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java
 
  Index: AprEndpoint.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- AprEndpoint.java 14 Jul 2005 17:45:25 -0000 1.63
  +++ AprEndpoint.java 14 Jul 2005 22:35:21 -0000 1.64
  @@ -511,9 +511,13 @@
           serverSock = Socket.create(Socket.APR_INET, Socket.SOCK_STREAM,
                   Socket.APR_PROTO_TCP, rootPool);
           // Bind the server socket
  -        Socket.bind(serverSock, inetAddress);
  +        int ret = Socket.bind(serverSock, inetAddress);
  +        if (ret != 0)
  +          throw(new Exception("bind failed: " + ret));
           // Start listening on the server socket
  -        Socket.listen(serverSock, backlog);
  +        ret = Socket.listen(serverSock, backlog);
  +        if (ret != 0)
  +          throw(new Exception("listen failed: " + ret));
   
           // Sendfile usage on systems which don't support it cause major problems
           if (useSendfile && !Library.APR_HAS_SENDFILE) {
 
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]