[Top][All Lists]

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

[osip-dev] problem with eXosip_register_build_initial_register_withqvalu

From: FEICHTER Christoph
Subject: [osip-dev] problem with eXosip_register_build_initial_register_withqvalue
Date: Mon, 17 Oct 2016 11:25:39 +0000



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:




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;








reply via email to

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