Line 0
Link Here
|
|
|
1 |
--- src/h323caps.cxx.orig 2006-05-16 07:36:01.000000000 -0400 |
2 |
+++ src/h323caps.cxx 2007-12-31 15:28:02.000000000 -0500 |
3 |
@@ -2076,7 +2076,7 @@ |
4 |
PINDEX simultaneous, |
5 |
const PString & name) |
6 |
{ |
7 |
- PINDEX reply = descriptorNum == P_MAX_INDEX ? P_MAX_INDEX : simultaneous; |
8 |
+/* PINDEX reply = descriptorNum == P_MAX_INDEX ? P_MAX_INDEX : simultaneous; |
9 |
|
10 |
PStringArray wildcard = name.Tokenise('*', FALSE); |
11 |
|
12 |
@@ -2109,6 +2109,46 @@ |
13 |
} |
14 |
|
15 |
return reply; |
16 |
+*/ |
17 |
+ |
18 |
+ |
19 |
+ |
20 |
+ |
21 |
+ PINDEX reply = descriptorNum == P_MAX_INDEX ? P_MAX_INDEX : simultaneous; |
22 |
+ |
23 |
+ PStringArray wildcard = name.Tokenise('*', FALSE); |
24 |
+ |
25 |
+ H323CapabilityFactory::KeyList_T stdCaps = H323CapabilityFactory::GetKeyList(); |
26 |
+ |
27 |
+ for (unsigned session = OpalMediaFormat::FirstSessionID; session <= OpalMediaFormat::LastSessionID; session++) { |
28 |
+ for (H323CapabilityFactory::KeyList_T::const_iterator r = stdCaps.begin(); r != stdCaps.end(); ++r) { |
29 |
+ PString capName(*r); |
30 |
+ if (MatchWildcard(capName, wildcard) && (FindCapability(capName) == NULL)) { |
31 |
+ OpalMediaFormat mediaFormat(capName); |
32 |
+ if (!mediaFormat.IsValid() && (capName.Right(4) == "{sw}") && capName.GetLength() > 4) |
33 |
+ mediaFormat = OpalMediaFormat(capName.Left(capName.GetLength()-4)); |
34 |
+ if (mediaFormat.IsValid() && mediaFormat.GetDefaultSessionID() == session) { |
35 |
+ // add the capability |
36 |
+ H323Capability * capability = H323Capability::Create(capName); |
37 |
+ PINDEX num = SetCapability(descriptorNum, simultaneous, capability); |
38 |
+ if (descriptorNum == P_MAX_INDEX) { |
39 |
+ reply = num; |
40 |
+ descriptorNum = num; |
41 |
+ simultaneous = P_MAX_INDEX; |
42 |
+ } |
43 |
+ else if (simultaneous == P_MAX_INDEX) { |
44 |
+ if (reply == P_MAX_INDEX) |
45 |
+ reply = num; |
46 |
+ simultaneous = num; |
47 |
+ } |
48 |
+ } |
49 |
+ } |
50 |
+ } |
51 |
+ simultaneous = P_MAX_INDEX; |
52 |
+ } |
53 |
+ |
54 |
+ return reply; |
55 |
+ |
56 |
} |
57 |
|
58 |
|