From 755bdb8505516c518bc131fa3a2b6f7a3a5eea27 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Fri, 17 Sep 2021 15:39:35 +0200 Subject: Fixed bug that stopped registration towards remote registrar If someone tries to register to us, which does not make sense, caused to stop the registration process to the remote registrar. This is now fixed. --- src/sip/sip.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/sip/sip.c b/src/sip/sip.c index 0988213..d1f40c7 100644 --- a/src/sip/sip.c +++ b/src/sip/sip.c @@ -893,7 +893,6 @@ static void ep_i_register(sip_endpoint_t *sip_ep, int status, nua_t *nua, nua_ha nua_destroy_event(saved); PDEBUG(DSIP, DEBUG_DEBUG, "destroying nua_handle %p (register)\n", nh); nua_handle_destroy(nh); - sip_ep->register_handle = NULL; return; } @@ -930,7 +929,6 @@ static void ep_i_register(sip_endpoint_t *sip_ep, int status, nua_t *nua, nua_ha nua_destroy_event(saved); PDEBUG(DSIP, DEBUG_DEBUG, "destroying nua_handle %p (register)\n", nh); nua_handle_destroy(nh); - sip_ep->register_handle = NULL; return; } @@ -963,7 +961,6 @@ static void ep_i_register(sip_endpoint_t *sip_ep, int status, nua_t *nua, nua_ha // PDEBUG(DSIP, DEBUG_DEBUG, "nua_handle %p (register)\n", nh); PDEBUG(DSIP, DEBUG_DEBUG, "destroying nua_handle %p (register)\n", nh); nua_handle_destroy(nh); - sip_ep->register_handle = NULL; } static void ep_r_register(sip_endpoint_t *sip_ep, int status, char const *phrase, nua_handle_t *nh, sip_t const *sip) @@ -1507,10 +1504,6 @@ static void sip_message(nua_event_t event, int status, char const *phrase, nua_t /* new handle */ switch (event) { case nua_i_register: - if (!call && !sip_ep->register_handle) { - PDEBUG(DSIP, DEBUG_DEBUG, "new nua_handle %p (register)\n", nh); - sip_ep->register_handle = nh; - } if (!call) { ep_i_register(sip_ep, status, nua, nh, sip); return; -- cgit v1.2.3