aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-06-24 20:43:40 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-06-24 20:43:40 +0200
commit4aff81887842942f7787a889097a7cb973f7965c (patch)
tree1c9e0e318c01e536c59d28e98a611b654d76ac0b
parent0d952b54fb22f6ec1768c1ce8ddcd415f7220c00 (diff)
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.
-rw-r--r--callagent/MGCPEndpoint.st13
1 files changed, 13 insertions, 0 deletions
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 [
<category: 'allocation'>
self requireState: self class stateUsed.
state := self class stateUnused.
+ sdp := nil.
+ callid := nil.
]
tryBlock [
@@ -117,6 +119,17 @@ Object subclass: MGCPEndpoint [
sdp: aSdp [
<category: 'sdp'>
+ self requireState: self class stateUsed.
sdp := aSdp.
]
+
+ callId [
+ <category: 'callid'>
+ ^ callid
+ ]
+
+ callId: aCallId [
+ self requireState: self class stateReserved.
+ callid := aCallId.
+ ]
]