Selaa lähdekoodia

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

Don't continue parsing the node url if errors were spotted, in db mode.
Stefan Mititelu 9 vuotta sitten
vanhempi
commit
b79d23436b
1 muutettua tiedostoa jossa 12 lisäystä ja 2 poistoa
  1. 12 2
      modules/rtpengine/rtpengine.c

+ 12 - 2
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;
+				}
 			}
 		}