Re: [reSIProcate] ClientSubscription - onUpdateActive gets called twiceand annoying assert
Your fix seems reasonable to me. We should only notify next if we are
responding to a notify we already received.
Scott
> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxxx
> [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of
> Van c. Nguyen
> Sent: Thursday, March 15, 2007 5:08 PM
> To: resiprocate-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: [reSIProcate] ClientSubscription - onUpdateActive gets called
> twiceand annoying assert
>
>
> This assert in ClientSubscription::acceptUpdate is getting annoying to
> me:
>
> ClientSubscription::acceptUpdate(int statusCode)
> {
> assert(!mQueuedNotifies.empty()); <<<<<<<<<<< HERE
> if (mQueuedNotifies.empty())
> {
> InfoLog(<< "No queued notify to accept");
> return;
> }
> ...
>
> However, getting 2 'onUpdateActive' callback for the 1 NOTIFY is not
> quite
> right either.
> The call flow to get this is as follows: (resip log and Ethereal trace
> readily available)
>
> Alice Bob
> | |
> | |
> F1 |<----- NOTIFY ----- |
> F2 |--- SUB(refresh) -->|
> F3 |--- 200 (NOTIFY) -->|
>
>
> F2 is triggered by 'requestRefresh' which calls
> 'ClientSubscription::send'
> and in 'send', we would set the immediate timer to dispatch the next
> NOTIFY
> to DUM's user:
>
> void
> ClientSubscription::send(SharedPtr<SipMessage> msg)
> {
> ...
> if (!mEnded)
> {
> if (!mQueuedNotifies.empty())
> {
> mDum.addTimer(DumTimeout::SendNextNotify,
> 0,
> getBaseHandle(),
> 0);
> }
> ...
>
> The next NOTIFY is still the same NOTIFY on top of the queue, hence
> onUpdateActive is called twice requiring 2 'acceptUpdate' which leads
> to my
> assert.
>
>
> Suggested Resolution:
>
> For the 2nd conditional, check that the message being sent is a
> response (to
> the NOTIFY):
>
> if (!mQueuedNotifies.empty() && msg->isResponse())
>
>
> Could someone verify the fix please. Two weeks silence affirm the fix.
>
> Thanx,
> V.
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 268.18.11/723 - Release Date:
> 3/15/2007
> 11:27 AM
>
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxxx
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel