From 9fae77ae76d41206420970edae435b25e2d9f2c7 Mon Sep 17 00:00:00 2001
From: Anthony Minessale <anthm@freeswitch.org>
Date: Wed, 31 Oct 2012 13:02:03 -0500
Subject: [PATCH] doh

---
 src/mod/endpoints/mod_loopback/mod_loopback.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mod/endpoints/mod_loopback/mod_loopback.c b/src/mod/endpoints/mod_loopback/mod_loopback.c
index adf911cbba..e711622d34 100644
--- a/src/mod/endpoints/mod_loopback/mod_loopback.c
+++ b/src/mod/endpoints/mod_loopback/mod_loopback.c
@@ -1169,8 +1169,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_loopback_load)
 
 	memset(&globals, 0, sizeof(globals));
 
-	SWITCH_ADD_APP(app_interface, "unloop", "Tell loopback to unfold", "Tell loopback to unfold", unloop_function, "", SAF_NO_LOOPBACK);
-
 	/* connect my internal structure to the blank pointer passed to me */
 	*module_interface = switch_loadable_module_create_module_interface(pool, modname);
 	loopback_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
@@ -1178,6 +1176,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_loopback_load)
 	loopback_endpoint_interface->io_routines = &channel_io_routines;
 	loopback_endpoint_interface->state_handler = &channel_event_handlers;
 
+	SWITCH_ADD_APP(app_interface, "unloop", "Tell loopback to unfold", "Tell loopback to unfold", unloop_function, "", SAF_NO_LOOPBACK);
+
 	/* indicate that the module should continue to be loaded */
 	return SWITCH_STATUS_SUCCESS;
 }