From e15e2810a62b4a045c7828fd69f084dcf6e65883 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sat, 20 Mar 2021 11:36:31 +0100 Subject: Minor fixes --- src/sip/sip.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/sip/sip.c b/src/sip/sip.c index 1122f89..2a29f66 100644 --- a/src/sip/sip.c +++ b/src/sip/sip.c @@ -446,10 +446,10 @@ static void release_and_destroy(call_t *call, uint8_t cc_isdn_cause, uint16_t cc static void setup_req(call_t *call, osmo_cc_msg_t *msg) { - char from[256] = ""; + char from[512] = ""; char asserted_id[256] = "", asserted_msg[512] = ""; - char to[256] = ""; - char contact[256 + 10] = ""; + char to[512] = ""; + char contact[1024] = ""; sip_cseq_t *cseq = NULL; uint8_t type, plan, present, screen; char callerid[256], dialing[256]; @@ -906,12 +906,14 @@ static void ep_i_register(sip_endpoint_t *sip_ep, int status, nua_t *nua, nua_ha strncpy(sip_ep->remote_contact, contact, sizeof(sip_ep->remote_contact) - 1); sip_ep->remote_peer = sip_ep->remote_contact; sip_ep->register_nonce[0] = '\0'; + PDEBUG(DSIP, DEBUG_DEBUG, "remote contact '%s'\n", sip_ep->remote_peer); } PDEBUG(DSIP, DEBUG_INFO, "Sending REGISTER response: %d %s (registration)\n", status, auth_text); nua_respond(nh, status, auth_text, SIPTAG_CONTACT(sip->sip_contact), NUTAG_WITH_THIS_MSG(data->e_msg), TAG_IF(auth_str[0], SIPTAG_WWW_AUTHENTICATE_STR(auth_str)), TAG_END()); nua_destroy_event(saved); +// 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; @@ -978,6 +980,7 @@ static void ep_i_options(nua_t *nua, nua_handle_t *nh) nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS_MSG(data->e_msg), TAG_END()); nua_destroy_event(saved); + PDEBUG(DSIP, DEBUG_DEBUG, "nua_handle %p (register)\n", nh); // NOTE: nh will be destroyed by caller of this function } -- cgit v1.2.3