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

Author: Stefan Mititelu <[email protected]>
Committer: Stefan Mititelu <[email protected]>
Date: 2015-12-11T17:21:16+02:00

rtpengine: Don't add invalid URL node, in db mode

Don't continue parsing the node url if errors were spotted, in db mode.

---

Modified: modules/rtpengine/rtpengine.c

---

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

---

diff --git a/modules/rtpengine/rtpengine.c b/modules/rtpengine/rtpengine.c
index 4af1c5e..8481c43 100644
--- a/modules/rtpengine/rtpengine.c
+++ b/modules/rtpengine/rtpengine.c
@@ -794,7 +794,12 @@ int add_rtpengine_socks(struct rtpp_set * rtpp_list, char 
* rtpproxy,
                        rtpp_no--;
                        shm_free(pnode->rn_url.s);
                        shm_free(pnode);
-                       continue;
+
+                       if (!isDB) {
+                               continue;
+                       } else {
+                               return 0;
+                       }
                }
 
                /* Check the rn_address is 'hostname:port' */
@@ -812,7 +817,12 @@ int add_rtpengine_socks(struct rtpp_set * rtpp_list, char 
* rtpproxy,
                                rtpp_no--;
                                shm_free(pnode->rn_url.s);
                                shm_free(pnode);
-                               continue;
+
+                               if (!isDB) {
+                                       continue;
+                               } else {
+                                       return 0;
+                               }
                        }
                }
 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to