osip-dev
[Top][All Lists]
Advanced

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

Re: [osip-dev] problem with eXosip_register_build_initial_register_withq


From: Aymeric Moizard
Subject: Re: [osip-dev] problem with eXosip_register_build_initial_register_withqvalue
Date: Tue, 18 Oct 2016 04:27:01 +0200

Hi Chrisptoph,

I did a fix in the git. I only remove the context if it was previously created.
Also, because we already have the context, I do not call the method "remove"
because it would add an extra search.

Tks a lot
Aymeric


2016-10-17 18:47 GMT+02:00 Aymeric Moizard <address@hidden>:

Hi Christophe!

I will check the issue later! I'm travelling now.

Tks for reporting!
Regards
Aymeric


Le 17 oct. 2016 8:26 PM, "FEICHTER Christoph" <Christoph.FEICHTER@frequentis.com> a écrit :

hi,

 

I found a problem with eXosip_register_build_initial_register_withqvalue.

 

suggest the following:

the app calls eXosip_register_build_initial_register

which internally maps to eXosip_register_build_initial_register_withqvalue

_eXosip_reg_init was successful – thus,

 

                ADD_ELEMENT (excontext->j_reg, jr);

 

has been called.

now, if  _eXosip_register_build_register fails,

the app has not chance to call  eXosip_register_remove for removing the registration,

because no rid has been passed to the app as return-value of eXosip_register_build_initial_register !!

 

with subsequent retries of eXosip_register_build_initial_register

the list excontext->j_reg ecomes bigger and bigger.

 

 

I suggest to  cleanup internally, in case that eXosip_register_build_initial_register fails:

 

 

int

eXosip_register_build_initial_register_withqvalue (struct eXosip_t *excontext, const char *from, const char *proxy, const char *contact, int expires, const char *qvalue, osip_message_t ** reg)

{

  ...

 

  i = _eXosip_register_build_register (excontext, jr, reg);

  if (i != 0) {

    OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "eXosip: cannot build REGISTER!\n"));

    *reg = NULL;

    eXosip_register_remove (excontext, jr->r_id);

    return i;

  }

 

  return jr->r_id;

}

 

 

br,

Christoph

 

 


_______________________________________________
osip-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/osip-dev




--
Antisip - http://www.antisip.com

reply via email to

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