xinbc / jdiameter

Automatically exported from code.google.com/p/jdiameter
0 stars 0 forks source link

SCTP Transport classes define static variables for association #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found a small but significant (and devil to find!) bug in the jdiameter SCTP 
extension.

In org.jdiameter.server.impl.io.sctp.SCTPTransportServer:

These 3 variables were accidentally set to static - they should NOT be static.
public String serverAssociationName;
public String remoteClientAssociationName;
public String serverName;

SCTPTransportServer is instantiated once as the server listener and then once 
for each peer connection.  These variables should be unique for each instance. 
Because the variables were declared static they were not unique for each 
instance, which caused ocassional errors where for example the 
remoteClientAssociationName was always set to the last peer connection 
initiated, resulting in the wrong association to sometimes to be shutdown.

Original issue reported on code.google.com by richard....@smilecoms.com on 19 Feb 2013 at 9:28

GoogleCodeExporter commented 9 years ago
Nice catch Richard, this definitely is a devil one. Will fix it.

Thanks.

Original comment by brainslog on 13 Dec 2013 at 12:19

GoogleCodeExporter commented 9 years ago
Found similar issue on client side as well.

Also, I don't see any reason why they should be public. I'll set them to 
private, it doesn't cause any issues in compilation, let me know if there's 
something I am missing.

Original comment by brainslog on 13 Dec 2013 at 12:36

GoogleCodeExporter commented 9 years ago
This issue was fixed by revision 64262ad3e9ca.

Original comment by brainslog on 13 Dec 2013 at 12:50