[Pkg-voip-commits] [janus] 16/282: Moved IP self-detect of NoSIP plugin outside of the config parse code

Jonas Smedegaard dr at jones.dk
Wed Dec 20 21:53:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.2.6-1
in repository janus.

commit 10662298532cd652962d20430c2670f5a6d8ad81
Author: Lorenzo Miniero <lminiero at gmail.com>
Date:   Fri Mar 17 18:04:33 2017 +0100

    Moved IP self-detect of NoSIP plugin outside of the config parse code
---
 plugins/janus_nosip.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/plugins/janus_nosip.c b/plugins/janus_nosip.c
index 885e407..b9e34e8 100644
--- a/plugins/janus_nosip.c
+++ b/plugins/janus_nosip.c
@@ -452,14 +452,6 @@ int janus_nosip_init(janus_callbacks *callback, const char *config_path) {
 				}
 			}
 		}
-		if(local_ip == NULL) {
-			local_ip = janus_network_detect_local_ip_as_string(janus_network_query_options_any_ip);
-			if(local_ip == NULL) {
-				JANUS_LOG(LOG_WARN, "Couldn't find any address! using 127.0.0.1 as the local IP... (which is NOT going to work out of your machine)\n");
-				local_ip = g_strdup("127.0.0.1");
-			}
-		}
-		JANUS_LOG(LOG_VERB, "Local IP set to %s\n", local_ip);
 
 		item = janus_config_get_item_drilldown(config, "general", "events");
 		if(item != NULL && item->value != NULL)
@@ -472,6 +464,15 @@ int janus_nosip_init(janus_callbacks *callback, const char *config_path) {
 	}
 	config = NULL;
 
+	if(local_ip == NULL) {
+		local_ip = janus_network_detect_local_ip_as_string(janus_network_query_options_any_ip);
+		if(local_ip == NULL) {
+			JANUS_LOG(LOG_WARN, "Couldn't find any address! using 127.0.0.1 as the local IP... (which is NOT going to work out of your machine)\n");
+			local_ip = g_strdup("127.0.0.1");
+		}
+	}
+	JANUS_LOG(LOG_VERB, "Local IP set to %s\n", local_ip);
+
 #ifdef HAVE_SRTP_2
 	/* Init randomizer (for randum numbers in SRTP) */
 	RAND_poll();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git



More information about the Pkg-voip-commits mailing list