Looking at the code, the state is changed to either RetryAdding
or RetryRefreshing.
requestRefresh can only be called if you are successfully
registered, and you want to refresh before the timeout interval.
From: Ali Pey
[mailto:alipey@xxxxxxxxx]
Sent: Thursday, October 12, 2006 3:46 PM
To: Scott Godin
Cc: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: DUM: ClientRegistration::requestRefresh does not work
If the registration fails or times out, the client is not registered anymore,
however, the mState is still registered. If you requestRefresh at this point,
it would not work.
The mState should be reset after registration failure or time out.
Scott,
Can you put this fix in as well please?
Thanks,
Ali
On 10/12/06, Scott Godin < slgodin@xxxxxxxxxxxx> wrote:
You can store the handle after
you get the first onSuccess or onFailure call. Unfortunately - I
don't think you get the handle before these callbacks.
From: Ali Pey [mailto:alipey@xxxxxxxxx]
Sent: Thursday, October 12, 2006 1:13 PM
How would I call ClientRegistration::requestRefresh?
There is no handle in DUM
that I can call this from my application.
On 10/12/06, Scott Godin < slgodin@xxxxxxxxxxxx> wrote:
I will apply this fix – thanks.
You can use
ClientRegistration::requestRefresh in order to request an immediate refresh
before the timeout interval.
ClientRegistration can set mUserRefresh = true
after onFailure and onRequestRetry. This way it will call onSuccess after
successful re-registration.
I tested it and it worked fine. Should I submit the fix? if yes how?
You also mentioned " You normally only get an onSuccess if
you did something to invoke the registration." How would I invoke registration? Let's say
the application needs a fresh registration again before it times out or while
it's waiting for re-registration.
This can be quite useful if the far end is not reachable or the user tries to
make a call and you are not registered at that moment.
Thanks,
Ali
On 10/12/06, Scott Godin < slgodin@xxxxxxxxxxxx> wrote:
Ah I see. I agree – there
should be an onSuccess call, if there was a previous onFailure.
Here is the scenario:
1- ClientRegistration registers with a Registrar Server successfully. If calls
onSuccess on the handler so your application knows that you are registered. The
Re-Registration time is set to 30 second.
2- Registrar Server is not reachable. ClientRegistration can not register any
more. It times out and it calls onRequestRetry on the handler. The application
now knows that it's not connected to the server.
3- Link is back up. ClientRegistration successfully re-registers with the
Registrar Server. The handler/application does not get notified so your
application thinks that it's still not registered.
The application or handler needs to be notified that it is registered with the
server and can provide service to the user.
Am I missing something?
Regards,
Ali
On 10/11/06, Scott Godin < slgodin@xxxxxxxxxxxx > wrote:
This behavior is
intentional. You normally only get an onSuccess if you did something to
invoke the registration. Automatic re-registrations only callback if
there is a failure.
Hi There,
I found and fixed a bug with DUM's ClientRegistration.
ClinentRegistration class calls the handler's onFailure or onRequestRetry if
the registration fails or times out. However, it won't call onSuccess when it
successfully re-registers.
Is there a process for submitting fixes to resiprocate/DUM?
What do I need to do?
Cheers,
Ali
|