classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: Get socket port before the socket is closed (CORBA)


From: Meskauskas Audrius
Subject: [cp-patches] FYI: Get socket port before the socket is closed (CORBA)
Date: Wed, 1 Jun 2005 09:56:19 +0200

The CORBA Functional ORB tries to use the ports in the ordered way,
when possible. To know if the given port is free and available, it opens
a socket on it, then closes that socket. If no exception is thrown, the
port is available and its number is returned from the method.

Jeroen Frijters have discovered that this may fail if the closed socket does not return the correct port number. While he also corrected
the socket implementation making it more Sun compliant (good thing in
any case), indeed, why to ask that number from the closed socket if we can take it from the local variable.

The attached patch do not longer asks the port number from the closed
socket.

2005-06-1  Audrius Meskauskas <address@hidden>

* gnu/CORBA/Functional_ORG.java (getFreePort): Remember
the port number in the local variable.

Attachment: Port.java.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]