[sr-dev] git:master:a787c38c: Revert "modules/ims_qos modules/ims_registrar_scscf: fix comparison of unsigned expression"

Mikko Lehto mslehto at ıki.fi
Fri Jun 3 09:25:50 CEST 2016


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

Author: Mikko Lehto <mslehto@ıki.fi>
Committer: Mikko Lehto <mslehto@ıki.fi>
Date: 2016-06-02T16:50:35+03:00

Revert "modules/ims_qos modules/ims_registrar_scscf: fix comparison of unsigned expression"

This reverts commit 94b4c25640c0f486c578a9e0670dad0aa5dda0c1.

---

Modified: modules/ims_qos/rx_avp.c
Modified: modules/ims_registrar_scscf/save.c

---

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

---

diff --git a/modules/ims_qos/rx_avp.c b/modules/ims_qos/rx_avp.c
index 124855c..657716c 100644
--- a/modules/ims_qos/rx_avp.c
+++ b/modules/ims_qos/rx_avp.c
@@ -489,7 +489,7 @@ inline int rx_add_media_component_description_avp(AAAMessage *msg, int number, s
 	// Get A=RS-bandwidth from SDP-Reply:
         bandwidth = sdp_b_value(rpl_raw_payload, "RS");
         LM_DBG("Answer: Got bandwidth %i from b=RS-Line\n", bandwidth);
-	if (bandwidth > 0) {
+	if (bandwidth >= 0) {
 		// Add AVP
 		set_4bytes(x,bandwidth);
 		rs_bw = cdpb.AAACreateAVP(AVP_EPC_RS_Bandwidth,
@@ -501,7 +501,7 @@ inline int rx_add_media_component_description_avp(AAAMessage *msg, int number, s
 	// Get A=RS-bandwidth from SDP-Reply:
         bandwidth = sdp_b_value(rpl_raw_payload, "RR");
         LM_DBG("Answer: Got bandwidth %i from b=RR-Line\n", bandwidth);
-	if (bandwidth > 0) {
+	if (bandwidth >= 0) {
 		// Add AVP
 		set_4bytes(x,bandwidth);
 		rr_bw = cdpb.AAACreateAVP(AVP_EPC_RR_Bandwidth,
diff --git a/modules/ims_registrar_scscf/save.c b/modules/ims_registrar_scscf/save.c
index 47dcf80..501eaa7 100644
--- a/modules/ims_registrar_scscf/save.c
+++ b/modules/ims_registrar_scscf/save.c
@@ -111,7 +111,7 @@ static inline int randomize_expires(int expires, int range) {
 static inline int calc_contact_expires(contact_t *c, unsigned int expires_hdr, int sos_reg) {
     unsigned int r;
 
-    if (expires_hdr > 0)
+    if (expires_hdr >= 0)
         r = expires_hdr;
     else {
         r = (sos_reg > 0) ? default_registrar_cfg.em_default_expires : default_registrar_cfg.default_expires;




More information about the sr-dev mailing list