[Freeswitch-svn] [commit] r7397 - freeswitch/trunk/src/mod/applications/mod_dptools

Freeswitch SVN mikej at freeswitch.org
Sun Jan 27 17:05:01 EST 2008


Author: mikej
Date: Sun Jan 27 17:05:01 2008
New Revision: 7397

Modified:
   freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c

Log:
clean error handling on user endpoint

Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	Sun Jan 27 17:05:01 2008
@@ -1433,7 +1433,6 @@
 	switch_event_create(&params, SWITCH_EVENT_MESSAGE);
 	switch_assert(params);
 	switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "as_channel", "true");
-	
 
 	if (switch_xml_locate_user("id", user, domain, NULL, &xml, &x_domain, &x_user, params) != SWITCH_STATUS_SUCCESS) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "can't find user [%s@%s]\n", user, domain);
@@ -1464,10 +1463,6 @@
 		}
 	}
 
- done:
-
-	switch_event_destroy(&params);
-
 	if (dest) {
 		const char *var;
 		char *d_dest = NULL;
@@ -1530,10 +1525,14 @@
 		}
 	}
 
+ done:
+
 	if (xml) {
 		switch_xml_free(xml);
 	}
 	
+	switch_event_destroy(&params);
+
 	switch_safe_free(user);
 
 	return cause;



More information about the Freeswitch-svn mailing list