Module: kamailio Branch: master Commit: 7818f89d5b6a1be14b0378f80d247374e889994e URL: https://github.com/kamailio/kamailio/commit/7818f89d5b6a1be14b0378f80d247374e889994e
Author: Victor Seva <[email protected]> Committer: Victor Seva <[email protected]> Date: 2025-08-01T16:23:03+02:00 ims_qos_npn: print string value of reg_state This helps a bit while debugging --- Modified: src/modules/ims_qos_npn/ims_qos_mod.c Modified: src/modules/ims_qos_npn/rx_aar.c --- Diff: https://github.com/kamailio/kamailio/commit/7818f89d5b6a1be14b0378f80d247374e889994e.diff Patch: https://github.com/kamailio/kamailio/commit/7818f89d5b6a1be14b0378f80d247374e889994e.patch --- diff --git a/src/modules/ims_qos_npn/ims_qos_mod.c b/src/modules/ims_qos_npn/ims_qos_mod.c index d83e74ffcec..497a131328b 100644 --- a/src/modules/ims_qos_npn/ims_qos_mod.c +++ b/src/modules/ims_qos_npn/ims_qos_mod.c @@ -709,15 +709,16 @@ void callback_pcscf_contact_cb(struct pcontact *c, int type, void *param) LM_DBG("PCSCF Contact Callback!\n"); LM_DBG("Contact AOR: [%.*s]\n", c->aor.len, c->aor.s); LM_DBG("Callback type [%d]\n", type); - + LM_DBG("Reg state [%s]\n", reg_state_to_string(c->reg_state)); if(type == PCSCF_CONTACT_EXPIRE || type == PCSCF_CONTACT_DELETE) { // we don't need to send STR if no QoS was ever successfully registered! if(must_send_str && (c->reg_state != PCONTACT_REG_PENDING) && (c->reg_state != PCONTACT_REG_PENDING_AAR)) { - LM_DBG("Received notification of contact (in state [%d] deleted " + LM_DBG("Received notification of contact (in state [%s] deleted " "for signalling bearer with with Rx session ID: [%.*s]\n", - c->reg_state, c->rx_session_id.len, c->rx_session_id.s); + reg_state_to_string(c->reg_state), c->rx_session_id.len, + c->rx_session_id.s); LM_DBG("Sending STR\n"); rx_send_str(&c->rx_session_id); } @@ -1569,8 +1570,7 @@ static int w_rx_aar_register( LM_DBG("Message via is [%d://%.*s:%d]\n", vb->proto, vb->host.len, vb->host.s, via_port); - lock_get( - saved_t_data + lock_get(saved_t_data ->lock); //we lock here to make sure we send all requests before processing replies asynchronously for(h = msg->contact; h; h = h->next) { if(h->type == HDR_CONTACT_T && h->parsed) { @@ -1596,9 +1596,10 @@ static int w_rx_aar_register( } else if(pcontact->reg_state == PCONTACT_REG_PENDING || pcontact->reg_state == PCONTACT_REGISTERED) { //NEW reg request - LM_DBG("Contact [%.*s] exists and is in state " - "PCONTACT_REG_PENDING or PCONTACT_REGISTERED\n", - pcontact->aor.len, pcontact->aor.s); + LM_DBG("Contact [%.*s] exists and is in state %s or %s\n", + pcontact->aor.len, pcontact->aor.s, + reg_state_to_string(PCONTACT_REG_PENDING), + reg_state_to_string(PCONTACT_REGISTERED)); //check for existing Rx session if(pcontact->rx_session_id.len > 0 diff --git a/src/modules/ims_qos_npn/rx_aar.c b/src/modules/ims_qos_npn/rx_aar.c index 7d7aae7caad..10877607c6c 100644 --- a/src/modules/ims_qos_npn/rx_aar.c +++ b/src/modules/ims_qos_npn/rx_aar.c @@ -441,8 +441,8 @@ void async_aar_reg_callback( ci.reg_state = PCONTACT_REG_PENDING_AAR; ci.num_service_routes = 0; ci.num_public_ids = 0; - LM_DBG("impu: [%.*s] updating status to PCONTACT_REG_PENDING\n", - pcontact->aor.len, pcontact->aor.s); + LM_DBG("impu: [%.*s] updating status to %s\n", pcontact->aor.len, + pcontact->aor.s, reg_state_to_string(ci.reg_state)); ul.update_pcontact(domain_t, &ci, pcontact); //register for callbacks on contact ul.register_ulcb(pcontact, PCSCF_CONTACT_DELETE | PCSCF_CONTACT_EXPIRE, _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
