[sr-dev] git:master:5cd019ae: ims_usrloc_pcscf: do not updated received info should be write once info

jaybeepee jason.penton at gmail.com
Wed Sep 16 11:14:24 CEST 2015


Module: kamailio
Branch: master
Commit: 5cd019ae1491adc79e8768503787ab59cb5fef65
URL: https://github.com/kamailio/kamailio/commit/5cd019ae1491adc79e8768503787ab59cb5fef65

Author: jaybeepee <jason.penton at gmail.com>
Committer: jaybeepee <jason.penton at gmail.com>
Date: 2015-09-16T11:14:02+02:00

ims_usrloc_pcscf: do not updated received info should be write once info
        - also fixes memory corruption after pcontact structure optimised
          to use placement

---

Modified: modules/ims_usrloc_pcscf/udomain.c

---

Diff:  https://github.com/kamailio/kamailio/commit/5cd019ae1491adc79e8768503787ab59cb5fef65.diff
Patch: https://github.com/kamailio/kamailio/commit/5cd019ae1491adc79e8768503787ab59cb5fef65.patch

---

diff --git a/modules/ims_usrloc_pcscf/udomain.c b/modules/ims_usrloc_pcscf/udomain.c
index 0494699..e1f2ef5 100644
--- a/modules/ims_usrloc_pcscf/udomain.c
+++ b/modules/ims_usrloc_pcscf/udomain.c
@@ -390,15 +390,6 @@ int update_pcontact(struct udomain* _d, struct pcontact_info* _ci, struct pconta
 		}
 	}
 
-	// update received info (if info is available):
-	if (_ci->received_host.len > 0) {
-		if (_c->received_host.s)
-			shm_free(_c->received_host.s);
-		STR_SHM_DUP(_c->received_host, _ci->received_host, "update_pcontact");
-	}
-	if (_ci->received_port > 0) _c->received_port = _ci->received_port;
-	if (_ci->received_proto > 0) _c->received_proto = _ci->received_proto;
-
 	//update Rx reg session information
 	if (_ci->rx_regsession_id && _ci->rx_regsession_id->len>0 && _ci->rx_regsession_id->s) {
 		if (_c->rx_session_id.len > 0 && _c->rx_session_id.s) {




More information about the sr-dev mailing list