[Freeswitch-svn] [commit] r10571 - freeswitch/trunk/src/mod/xml_int/mod_xml_curl

FreeSWITCH SVN mikej at freeswitch.org
Wed Dec 3 08:16:50 PST 2008


Author: mikej
Date: Wed Dec  3 11:16:49 2008
New Revision: 10571

Log:
cleanup

Modified:
   freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c

Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c	(original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c	Wed Dec  3 11:16:49 2008
@@ -153,26 +153,19 @@
 
 	data = switch_event_build_param_string(params, basic_data, binding->vars_map);
 	switch_assert(data);
+
 	if (binding->use_dynamic_url) {
-		switch_status_t ok;
-		
-		do {
-			ok = switch_event_add_header_string(params, SWITCH_STACK_TOP, "hostname", switch_str_nil(hostname));
-			if (ok != SWITCH_STATUS_SUCCESS) break;
-			ok = switch_event_add_header_string(params, SWITCH_STACK_TOP, "section", switch_str_nil(section));
-			if (ok != SWITCH_STATUS_SUCCESS) break;
-			ok = switch_event_add_header_string(params, SWITCH_STACK_TOP, "tag_name", switch_str_nil(tag_name));
-			if (ok != SWITCH_STATUS_SUCCESS) break;
-			ok = switch_event_add_header_string(params, SWITCH_STACK_TOP, "key_name", switch_str_nil(key_name));
-			if (ok != SWITCH_STATUS_SUCCESS) break;
-			ok = switch_event_add_header_string(params, SWITCH_STACK_TOP, "key_value", switch_str_nil(key_value));
-		} while (0);
-		switch_assert(ok == SWITCH_STATUS_SUCCESS);
+		switch_event_add_header_string(params, SWITCH_STACK_TOP, "hostname", switch_str_nil(hostname));
+		switch_event_add_header_string(params, SWITCH_STACK_TOP, "section", switch_str_nil(section));
+		switch_event_add_header_string(params, SWITCH_STACK_TOP, "tag_name", switch_str_nil(tag_name));
+		switch_event_add_header_string(params, SWITCH_STACK_TOP, "key_name", switch_str_nil(key_name));
+		switch_event_add_header_string(params, SWITCH_STACK_TOP, "key_value", switch_str_nil(key_value));
 		dynamic_url = switch_event_expand_headers(params, binding->url);
 		switch_assert(dynamic_url);
 	} else {
 		dynamic_url = binding->url;
 	}
+
 	if (binding->use_get_style == 1) {
 		uri = malloc(strlen(data) + strlen(dynamic_url) + 16);
 		switch_assert(uri);



More information about the Freeswitch-svn mailing list