linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] linphone stays registered on deleted proxy con


From: Aurelien Bouin
Subject: Re: [Linphone-developers] linphone stays registered on deleted proxy configuration
Date: Tue, 3 Nov 2009 15:25:46 +0000 (GMT)

Hi,
I actually basically used your functions developped in command.c :
LOG_INFO("remove old proxies");
          linphonec_parse_command_line(lc, "unregister");
          int proxy_nb = ms_list_size(linphone_core_get_proxy_config_list(lc));
          LOG_NOTICE("destroying the %i previous proxies\r\n",proxy_nb);
          for(i = (proxy_nb -1); i >= 0; i--)
          {
                snprintf(temp,sizeof(temp),"proxy remove %i",i);
                linphonec_parse_command_line(lc, temp);
          }
          linphone_core_clear_all_auth_info(lc);
Thank you for your help,

Aurelien BOUIN

--- En date de : Mar 3.11.09, Simon Morlat <address@hidden> a écrit :

De: Simon Morlat <address@hidden>
Objet: Re: [Linphone-developers] linphone stays registered on deleted proxy configuration
À: "Aurelien Bouin" <address@hidden>
Cc: address@hidden
Date: Mardi 3 Novembre 2009, 11h30

Hi,

I think your loop is wrong. Indeed you are iterating with MSList that is being
modified within the loop by linphone_core_remove_proxy_config().
You should make a copy of the list with ms_list_copy() before entering the
loop.

Simon

Le lundi 2 novembre 2009 17:29:41, Aurelien Bouin a écrit :
> Hi,
> I am sorry but it is not working, the fallowing is the code I am using to
>  delete old proxies :
>
> LOG_INFO("remove old proxies");
> const MSList *list_proxies = linphone_core_get_proxy_config_list(lc);
>
> int size_list = ms_list_size(list_proxies);
> for(i = 0; i < size_list;i++)
> {
> LinphoneProxyConfig *cfg;
> cfg=(LinphoneProxyConfig*)ms_list_nth_data(list_proxies,i);
> if (cfg==NULL){
>     LOG_WARN("No such proxy %d in the list",i);
> }
> else
> {
> LOG_NOTICE("removing the proxy named %s",cfg->reg_proxy);
> linphone_proxy_config_edit(cfg);
> linphone_proxy_config_enable_register(cfg,FALSE);
> LOG_NOTICE("the proxy named %s should not register
>  anymore",cfg->reg_proxy); linphone_proxy_config_done(cfg);
> linphone_core_remove_proxy_config(lc,cfg);
> linphone_proxy_config_destroy(cfg);
> }
> }
>             linphone_core_clear_all_auth_info(lc);
>
> Thank you again,
> Sincerely,
>
> Aurelien BOUIN
>
> --- En date de : Lun 2.11.09, Simon Morlat <address@hidden> a
écrit :
> > De: Simon Morlat <address@hidden>
> > Objet: Re: [Linphone-developers] linphone stays registered on deleted
> > proxy configuration À: address@hidden
> > Cc: "Aurelien Bouin" <address@hidden>
> > Date: Lundi 2 Novembre 2009, 14h32
> > Hi,
> >
> > You should do the following before doing
> > linphone_core_remove_proxy_config
> >
> > linphone_proxy_config_edit(cfg);
> > linphone_proxy_config_enable_register(cfg,FALSE);
> > linphone_proxy_config_done(cfg);
> >
> > Simon
> >
> > Le vendredi 30 octobre 2009 13:56:36, Aurelien Bouin a
> >
> > écrit :
> > > Hello,
> > > I am wondering how to delete previous proxy
> >
> > configuration, I mean when I am
> >
> > >  registered on a working SIP server and want to
> >
> > disconnect to work in
> >
> > >  standalone mode actually linphone still stay
> >
> > connected even if I use the
> >
> > >  function
> >
> > linphone_core_remove_proxy_config(lc,cfg); because if I
> >
> > >  understand what's happen, the proxy goes in a
> >
> > list called
> >
> > >  lc->sip_conf.deleted_proxies and linphone
> >
> > automatically register with the
> >
> > >  function
> >
> > linphone_proxy_config_process_authentication_failure. . .
> > What
> >
> > >  should I do ?
> > > Thank you for your time,
> > > Sincerely,
> > >
> > > Aurelien BOUIN
> > >
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Linphone-developers mailing list
> > > address@hidden
> > > http://lists.nongnu.org/mailman/listinfo/linphone-developers
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]