When creating new account (simple or advance form) make sure we don't reuse old AccountRegistration instances.

cusax-fix
Damian Minkov 15 years ago
parent 99dea31ea2
commit f3845d02cb

@ -402,10 +402,14 @@ public void serviceAdded(ServiceEvent event)
public void serviceRemoved(ServiceEvent event)
{
String name = event.getName();
if (name.equals(id)) return;
if (name.equals(id))
return;
ContactZeroconfImpl contact = getContact(name, null);
if(contact == null)
return;
opSetPersPresence.changePresenceStatusForContact(contact,
ZeroconfStatusEnum.OFFLINE);
if (logger.isDebugEnabled())

@ -108,6 +108,13 @@ public String getProtocolDescription()
public Iterator<WizardPage> getPages()
{
java.util.List<WizardPage> pages = new ArrayList<WizardPage>();
// create new registration, our container needs the pages
// this means this is a new wizard and we must reset all data
// it will be invoked and when the wizard cleans and unregister
// our pages, but this fix don't hurt in this situation.
this.registration = new GoogleTalkAccountRegistration();
firstWizardPage = new FirstWizardPage(this);
pages.add(firstWizardPage);
@ -431,6 +438,11 @@ public boolean isWebSignupSupported()
public Object getSimpleForm()
{
// when creating first wizard page, create and new
// AccountRegistration to avoid reusing old instances and
// data left from old registrations
registration = new GoogleTalkAccountRegistration();
firstWizardPage = new FirstWizardPage(this);
return firstWizardPage.getSimpleForm();
}

@ -121,6 +121,13 @@ public String getProtocolDescription()
public Iterator<WizardPage> getPages()
{
java.util.List<WizardPage> pages = new ArrayList<WizardPage>();
// create new registration, our container needs the pages
// this means this is a new wizard and we must reset all data
// it will be invoked and when the wizard cleans and unregister
// our pages, but this fix don't hurt in this situation.
this.registration = new JabberAccountRegistration();
firstWizardPage = new FirstWizardPage(this);
pages.add(firstWizardPage);
@ -555,6 +562,11 @@ public boolean isWebSignupSupported()
*/
public Object getSimpleForm()
{
// when creating first wizard page, create and new
// AccountRegistration to avoid reusing old instances and
// data left from old registrations
this.registration = new JabberAccountRegistration();
firstWizardPage = new FirstWizardPage(this);
return firstWizardPage.getSimpleForm();
}

@ -116,6 +116,12 @@ public String getProtocolDescription() {
public Iterator<WizardPage> getPages() {
java.util.List<WizardPage> pages = new ArrayList<WizardPage>();
// create new registration, our container needs the pages
// this means this is a new wizard and we must reset all data
// it will be invoked and when the wizard cleans and unregister
// our pages, but this fix don't hurt in this situation.
this.registration = new SIPAccountRegistration();
// If the first wizard page was already created
if (firstWizardPage == null)
firstWizardPage = new FirstWizardPage(this);
@ -685,6 +691,11 @@ public boolean isWebSignupSupported()
*/
public Object getSimpleForm()
{
// when creating first wizard page, create and new
// AccountRegistration to avoid reusing old instances and
// data left from old registrations
this.registration = new SIPAccountRegistration();
firstWizardPage = new FirstWizardPage(this);
return firstWizardPage.getSimpleForm();
}

@ -108,6 +108,13 @@ public String getProtocolDescription()
public Iterator<WizardPage> getPages()
{
java.util.List<WizardPage> pages = new ArrayList<WizardPage>();
// create new registration, our container needs the pages
// this means this is a new wizard and we must reset all data
// it will be invoked and when the wizard cleans and unregister
// our pages, but this fix don't hurt in this situation.
this.registration = new ZeroconfAccountRegistration();
firstWizardPage = new FirstWizardPage(this);
pages.add(firstWizardPage);
@ -383,6 +390,11 @@ public boolean isWebSignupSupported()
public Object getSimpleForm()
{
// when creating first wizard page, create and new
// AccountRegistration to avoid reusing old instances and
// data left from old registrations
this.registration = new ZeroconfAccountRegistration();
firstWizardPage = new FirstWizardPage(this);
return firstWizardPage.getSimpleForm();
}

Loading…
Cancel
Save