From 4aff81887842942f7787a889097a7cb973f7965c Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 24 Jun 2011 20:43:40 +0200 Subject: callagent: Add setter for the MGCPEndpoint Verify the state where the SDP file and the CallId can be set. Unset those when the endpoint is put back into the unused state. --- callagent/MGCPEndpoint.st | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/callagent/MGCPEndpoint.st b/callagent/MGCPEndpoint.st index 53de003..fd2750b 100644 --- a/callagent/MGCPEndpoint.st +++ b/callagent/MGCPEndpoint.st @@ -92,6 +92,8 @@ Object subclass: MGCPEndpoint [ self requireState: self class stateUsed. state := self class stateUnused. + sdp := nil. + callid := nil. ] tryBlock [ @@ -117,6 +119,17 @@ Object subclass: MGCPEndpoint [ sdp: aSdp [ + self requireState: self class stateUsed. sdp := aSdp. ] + + callId [ + + ^ callid + ] + + callId: aCallId [ + self requireState: self class stateReserved. + callid := aCallId. + ] ] -- cgit v1.2.3