[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] jcerti/src/certi communication/CertiMessage.jav...
From: |
CERTI CVS commits |
Subject: |
[certi-cvs] jcerti/src/certi communication/CertiMessage.jav... |
Date: |
Fri, 16 Dec 2011 07:34:33 +0000 |
CVSROOT: /sources/certi
Module name: jcerti
Changes by: Eric NOULARD <erk> 11/12/16 07:34:33
Modified files:
src/certi/communication: CertiMessage.java
src/certi/rti/impl: CertiRtiAmbassador.java
Log message:
More synchronized in order to avoid conccurent client to access those.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/jcerti/src/certi/communication/CertiMessage.java?cvsroot=certi&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/jcerti/src/certi/rti/impl/CertiRtiAmbassador.java?cvsroot=certi&r1=1.4&r2=1.5
Patches:
Index: communication/CertiMessage.java
===================================================================
RCS file: /sources/certi/jcerti/src/certi/communication/CertiMessage.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- communication/CertiMessage.java 28 Nov 2011 12:56:00 -0000 1.3
+++ communication/CertiMessage.java 16 Dec 2011 07:34:33 -0000 1.4
@@ -91,7 +91,7 @@
if (tag != null) {
messageBuffer.write(tag);
}
- }
+ } // end of synchronized(messageBuffer)
}
/**
@@ -128,7 +128,7 @@
if (tagged) {
tag = messageBuffer.readBytes();
}
- }
+ } // end of synchronized(messageBuffer)
}
/**
Index: rti/impl/CertiRtiAmbassador.java
===================================================================
RCS file: /sources/certi/jcerti/src/certi/rti/impl/CertiRtiAmbassador.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- rti/impl/CertiRtiAmbassador.java 28 Nov 2011 12:56:00 -0000 1.4
+++ rti/impl/CertiRtiAmbassador.java 16 Dec 2011 07:34:33 -0000 1.5
@@ -192,6 +192,8 @@
tickRequest.setMinTickTime(minimum);
tickRequest.setMaxTickTime(maximum);
+ synchronized(this.messageBuffer) {
+
tickRequest.writeMessage(this.messageBuffer);
try {
@@ -258,6 +260,7 @@
}
}
}
+ } // end of synchronized(this.messageBuffer)
}
public void closeConnexion() {
@@ -3716,6 +3719,9 @@
}
private CertiMessage processRequest(CertiMessage request) throws
ArrayIndexOutOfBounds, AsynchronousDeliveryAlreadyEnabled,
AsynchronousDeliveryAlreadyDisabled, AttributeAlreadyOwned,
AttributeAlreadyBeingAcquired, AttributeAlreadyBeingDivested,
AttributeDivestitureWasNotRequested, AttributeAcquisitionWasNotRequested,
AttributeNotDefined, AttributeNotKnown, AttributeNotOwned,
AttributeNotPublished, RTIinternalError, ConcurrentAccessAttempted,
CouldNotDiscover, CouldNotOpenFED, CouldNotRestore, DeletePrivilegeNotHeld,
ErrorReadingFED, EventNotKnown, FederateAlreadyExecutionMember,
FederateInternalError, FederateNotExecutionMember, FederateOwnsAttributes,
FederatesCurrentlyJoined, FederateWasNotAskedToReleaseAttribute,
FederationExecutionAlreadyExists, FederationExecutionDoesNotExist,
FederationTimeAlreadyPassed, RegionNotKnown, InteractionClassNotDefined,
InteractionClassNotKnown, InteractionClassNotPublished,
InteractionParameterNotDefined, InteractionParameterNotKnown, InvalidExtents,
InvalidFederationTime, InvalidLookahead, InvalidOrderingHandle,
InvalidResignAction, InvalidRetractionHandle, InvalidTransportationHandle,
NameNotFound, ObjectClassNotDefined, ObjectClassNotKnown,
ObjectClassNotPublished, ObjectClassNotSubscribed, ObjectNotKnown,
ObjectAlreadyRegistered, RestoreInProgress, RestoreNotRequested,
SpaceNotDefined, SaveInProgress, SaveNotInitiated,
SpecifiedSaveLabelDoesNotExist, TimeAdvanceAlreadyInProgress,
TimeAdvanceWasNotInProgress, UnableToPerformSave, DimensionNotDefined,
OwnershipAcquisitionPending, FederateLoggingServiceCalls,
InteractionClassNotSubscribed, EnableTimeRegulationPending,
TimeRegulationAlreadyEnabled, TimeRegulationWasNotEnabled,
TimeConstrainedWasNotEnabled, EnableTimeConstrainedPending,
TimeConstrainedAlreadyEnabled, RegionInUse, InvalidRegionContext {
+
+ CertiMessage response = null;
+ synchronized(this.messageBuffer) {
request.writeMessage(this.messageBuffer);
try {
@@ -3726,7 +3732,6 @@
throw new RTIinternalError("libRTI: Network Write Error");
}
- CertiMessage response = null;
try {
response = MessageFactory.readMessage(messageBuffer);
@@ -3741,7 +3746,7 @@
} catch (CertiException ex) {
translateException(ex);
}
-
+ } // end of synchronized(this.messageBuffer)
return response;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] jcerti/src/certi communication/CertiMessage.jav...,
CERTI CVS commits <=