/[resiprocate]/main/resip/dum/DumTimeout.cxx
ViewVC logotype

Contents of /main/resip/dum/DumTimeout.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10695 - (show annotations) (download)
Fri Nov 22 23:12:34 2013 UTC (5 years, 11 months ago) by sgodin
File MIME type: text/plain
File size: 5875 byte(s)
-Merged from b-uasprack-20130904
  -added UAS Prack support to DUM!  Original implementation taken from b-uasprack-20091103
  -many changes, fixes and enhancements from original branch
  -MasterProfile setting setUasReliableProvisionalMode is used to enable
  -added mode called SupportedEssential where we will send reliable provisionals only if they
   are a provisional that is carrying an offer or answer  - required for 3GPP IMS flows 
  -added resubmit timer for reliable responses to ensure we send a reliable provisional at least 
   every 2.5 minutes  -new profile setting: set1xxRelResubmitTime to support this
  -updated state diagrams and added new PRACK flow diagrams to dum/doc directory (removed old diagrams)
  -fixed update glare handling for UAC prack 
  -added in support for UAC Prack to be able to send an offer in the first PRACK response 
  (must call provideOffer from onAnswer callback)
  -made a helper method on DialogUsageManager to set advertised capabilities 
  -fixed missing break in ClientInviteSession::dispatchReceivedUpdateEarly 
  

  
  
1 #include <cassert>
2 #include "DumTimeout.hxx"
3 #include "rutil/WinLeakCheck.hxx"
4 #include "resip/dum/BaseUsage.hxx"
5
6 using namespace resip;
7
8 DumTimeout::DumTimeout(Type type,
9 unsigned long duration,
10 BaseUsageHandle targetBu,
11 unsigned int seq,
12 unsigned int altSeq,
13 const Data &transactionId)
14 : mType(type),
15 mDuration(duration),
16 mUsageHandle(targetBu),
17 mSeq(seq),
18 mSecondarySeq(altSeq),
19 mTransactionId(transactionId)
20 {}
21
22 DumTimeout::DumTimeout(const DumTimeout& source)
23 : mType(source.mType),
24 mDuration(source.mDuration),
25 mUsageHandle(source.mUsageHandle),
26 mSeq(source.mSeq),
27 mSecondarySeq(source.mSecondarySeq),
28 mTransactionId(source.mTransactionId)
29 {}
30
31 DumTimeout::~DumTimeout()
32 {}
33
34 Message*
35 DumTimeout::clone() const
36 {
37 return new DumTimeout(*this);
38 }
39
40 DumTimeout::Type
41 DumTimeout::type() const
42 {
43 return mType;
44 }
45
46 unsigned int
47 DumTimeout::seq() const
48 {
49 return mSeq;
50 }
51
52 unsigned int
53 DumTimeout::secondarySeq() const
54 {
55 return mSecondarySeq;
56 }
57
58 const Data & DumTimeout::transactionId() const
59 {
60 return mTransactionId;
61 }
62
63 bool
64 DumTimeout::isClientTransaction() const
65 {
66 assert(0);
67 return false;
68 }
69
70 EncodeStream&
71 DumTimeout::encodeBrief(EncodeStream& strm) const
72 {
73 return encode(strm);
74 }
75
76 EncodeStream&
77 DumTimeout::encode(EncodeStream& strm) const
78 {
79 strm << "DumTimeout::";
80 switch (mType)
81 {
82 case SessionExpiration:
83 strm <<"SessionExpiration";
84 break;
85 case SessionRefresh:
86 strm <<"SessionRefresh";
87 break;
88 case Registration:
89 strm <<"Registration";
90 break;
91 case RegistrationRetry:
92 strm <<"RegistrationRetry";
93 break;
94 case Publication:
95 strm <<"Publication";
96 break;
97 case Retransmit200:
98 strm <<"Retransmit200";
99 break;
100 case Retransmit1xx:
101 strm <<"Retransmit1xx";
102 break;
103 case Retransmit1xxRel:
104 strm <<"Retransmit1xxRel";
105 break;
106 case Resubmit1xxRel:
107 strm <<"Resubmit1xxRel";
108 break;
109 case WaitForAck:
110 strm <<"WaitForAck";
111 break;
112 case CanDiscardAck:
113 strm <<"CanDiscardAck";
114 break;
115 case StaleCall:
116 strm <<"StaleCall";
117 break;
118 case Subscription:
119 strm <<"Subscription";
120 break;
121 case SubscriptionRetry:
122 strm <<"SubscriptionRetry";
123 break;
124 case WaitForNotify:
125 strm <<"WaitForNotify";
126 break;
127 case StaleReInvite:
128 strm <<"StaleReInvite";
129 break;
130 case Glare:
131 strm <<"Glare";
132 break;
133 case Cancelled:
134 strm <<"Cancelled";
135 break;
136 case WaitingForForked2xx:
137 strm <<"WaitingForForked2xx";
138 break;
139 case SendNextNotify:
140 strm <<"SendNextNotify";
141 break;
142 }
143 // Accessing mUsageHandle is not threadsafe, and this encode method is used outside
144 // the dum thread, in the stack thread via the TuSelector::add method for logging.
145 //if (mUsageHandle.isValid())
146 //{
147 // strm << " " << *mUsageHandle;
148 //}
149 //else
150 //{
151 // strm << " defunct";
152 //}
153
154 strm << ": duration=" << mDuration << " seq=" << mSeq;
155 return strm;
156 }
157
158 BaseUsageHandle
159 DumTimeout::getBaseUsage() const
160 {
161 return mUsageHandle;
162 }
163
164
165 /* ====================================================================
166 * The Vovida Software License, Version 1.0
167 *
168 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
169 *
170 * Redistribution and use in source and binary forms, with or without
171 * modification, are permitted provided that the following conditions
172 * are met:
173 *
174 * 1. Redistributions of source code must retain the above copyright
175 * notice, this list of conditions and the following disclaimer.
176 *
177 * 2. Redistributions in binary form must reproduce the above copyright
178 * notice, this list of conditions and the following disclaimer in
179 * the documentation and/or other materials provided with the
180 * distribution.
181 *
182 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
183 * and "Vovida Open Communication Application Library (VOCAL)" must
184 * not be used to endorse or promote products derived from this
185 * software without prior written permission. For written
186 * permission, please contact vocal@vovida.org.
187 *
188 * 4. Products derived from this software may not be called "VOCAL", nor
189 * may "VOCAL" appear in their name, without prior written
190 * permission of Vovida Networks, Inc.
191 *
192 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
193 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
194 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
195 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
196 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
197 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
198 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
199 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
200 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
201 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
202 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
203 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
204 * DAMAGE.
205 *
206 * ====================================================================
207 *
208 * This software consists of voluntary contributions made by Vovida
209 * Networks, Inc. and many individuals on behalf of Vovida Networks,
210 * Inc. For more information on Vovida Networks, Inc., please see
211 * <http://www.vovida.org/>.
212 *
213 */

Properties

Name Value
svn:eol-style native
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27