version 1.1, 2011/08/11 12:12:33
|
version 1.2, 2011/10/13 05:21:41
|
|
|
void IndicationRouter::deliverAndWaitForStatus() | void IndicationRouter::deliverAndWaitForStatus() |
{ | { |
String uniqueMessageId; | String uniqueMessageId; |
|
Uint32 timeoutMilliSec = _request->timeoutMilliSec; |
| |
#ifdef PEGASUS_ENABLE_INDICATION_ORDERING | #ifdef PEGASUS_ENABLE_INDICATION_ORDERING |
// Wait only if this indication is not coming from OOP provider. | // Wait only if this indication is not coming from OOP provider. |
|
|
| |
if (_entry) | if (_entry) |
{ | { |
// Maximum wait time is SequenceIdentifierLifetime = |
// Maximum wait time is equals to SequenceIdentifierLifeTime |
// 10 * DeliveryRetryAttempts * DeliveryRetryInterval |
// = 10 * DeliveryRetryAttempts * DeliveryRetryInterval |
Uint32 waitTime = 10 * 3 * 20 ; |
Uint32 maxWaitTimeMilliSec = 10 * 3 * 20 * 1000; |
_entry->semaphore.time_wait(waitTime * 1000); |
if (timeoutMilliSec == 0 ) |
|
{ |
|
// Minimum wait time is equals to default |
|
// DeliveryRetryAttempts * DeliveryRetryInterval |
|
timeoutMilliSec = 3 * 20 * 1000; |
|
} |
|
else if (timeoutMilliSec > maxWaitTimeMilliSec) |
|
{ |
|
timeoutMilliSec = maxWaitTimeMilliSec; |
|
} |
|
_entry->semaphore.time_wait(timeoutMilliSec); |
AutoMutex mtx(_statusMutex); | AutoMutex mtx(_statusMutex); |
_statusTable.remove(uniqueMessageId); | _statusTable.remove(uniqueMessageId); |
} | } |
|
|
DeliveryStatusAggregator:: DeliveryStatusAggregator( | DeliveryStatusAggregator:: DeliveryStatusAggregator( |
const String &origMessageId_, | const String &origMessageId_, |
Uint32 responseQid_, | Uint32 responseQid_, |
const String &oopAgentName_): |
const String &oopAgentName_, |
|
Boolean waitUntilDelivered_): |
origMessageId(origMessageId_), | origMessageId(origMessageId_), |
responseQid(responseQid_), | responseQid(responseQid_), |
oopAgentName(oopAgentName_), | oopAgentName(oopAgentName_), |
|
waitUntilDelivered(waitUntilDelivered_), |
_expectedResponseCount(0), | _expectedResponseCount(0), |
_currentResponseCount(0), | _currentResponseCount(0), |
_expectedResponseCountSetDone(false) | _expectedResponseCountSetDone(false) |