Re: cvs commit: jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni Echo.java

2005-04-18 Thread Mladen Turk
[EMAIL PROTECTED] wrote:
  +int rc = Socket.bind(serverSock, inetAddress);
  +if (rc != 0) {
  +  throw(new Exception(Can't create Acceptor:bind failed));
  +}
You can use 'throw(new Exception(Error.strerror(rv)));'
It will return apr_os_error.
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cvs commit: jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni Echo.java

2005-04-18 Thread jean-frederic clere
Mladen Turk wrote:
[EMAIL PROTECTED] wrote:
  +int rc = Socket.bind(serverSock, inetAddress);
  +if (rc != 0) {
  +  throw(new Exception(Can't create Acceptor:bind 
failed));
  +}

You can use 'throw(new Exception(Error.strerror(rv)));'
It will return apr_os_error.
done.
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cvs commit: jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni Echo.java

2005-04-15 Thread 国炳 陈
???

[EMAIL PROTECTED] wrote:jfclere 2005/04/15 07:24:53

Modified: jni/examples/org/apache/tomcat/jni Echo.java
Log:
Quick hack to get it compiled.

Revision Changes Path
1.3 +6 -4 jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/Echo.java

Index: Echo.java
===
RCS file: 
/home/cvs/jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/Echo.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Echo.java 14 Apr 2005 06:46:28 - 1.2
+++ Echo.java 15 Apr 2005 14:24:53 - 1.3
@@ -51,8 +51,8 @@
props.load(is);
is.close();
echoAddr = props.getProperty(echo.ip, 127.0.0.1);
- echoPort = Integer.decode(props.getProperty(echo.port, 23));
- echoNmax = Integer.decode(props.getProperty(echo.max, 1));
+ echoPort = Integer.decode(props.getProperty(echo.port, 23)).intValue();
+ echoNmax = Integer.decode(props.getProperty(echo.max, 1)).intValue();
}
catch (Throwable t) {
; // Nothing
@@ -159,15 +159,17 @@
worker.start();
}
}
+ /* XXX: JFC quick hack
catch(Error err ) {
if (Status.APR_STATUS_IS_TIMEUP(err.getError())) {
- /* TODO: deal with timeout */
+ /0 TODO: deal with timeout 0/
}
else {
err.printStackTrace();
break;
}
}
+ */
catch( Exception ex ) {
ex.printStackTrace();
break;




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




!
\\\|///
\\ - - //
( @ @ )
 oOOo- (_)-oOOo
:gzlongzhijian 
QQ(OICQ) 40831127 Q 
:[EMAIL PROTECTED] 
:http://www.gzlzj.com 
401 
:510630 :020-33629058 
 
 
 
 
 Oooo 
 oooO ( )
( ) ) /
\ ( (_/
\_)



-
Do You Yahoo!?
150MP3

1G1000