]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
doh
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 14 Nov 2008 02:46:28 +0000 (02:46 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 14 Nov 2008 02:46:28 +0000 (02:46 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10394 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_xml.h
src/switch_xml.c

index 43b58c399d269159b5fed8ba7461dc052eb593a2..06ac3fe11efacfa5bb40bc6240c7f1ff669b03ac 100644 (file)
@@ -353,7 +353,10 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_open_cfg(const char *file_path, switch_x
 ///\param user_data a pointer to private data to be used during the callback
 ///\return SWITCH_STATUS_SUCCESS if successful
 ///\note gateway functions will be executed in the order they were binded until a success is found else the root registry will be used
-SWITCH_DECLARE(switch_status_t) switch_xml_bind_search_function(switch_xml_search_function_t function, switch_xml_section_t sections, void *user_data);
+
+SWITCH_DECLARE(switch_status_t) switch_xml_bind_search_function_ret(switch_xml_search_function_t function, switch_xml_section_t sections, void *user_data, switch_xml_binding_t **ret);
+#define switch_xml_bind_search_function(_f, _s, _u) switch_xml_bind_search_function_ret(_u, _s, _u, NULL)
+
 
 SWITCH_DECLARE(switch_status_t) switch_xml_unbind_search_function(switch_xml_binding_t **binding);
 SWITCH_DECLARE(switch_status_t) switch_xml_unbind_search_function_ptr(switch_xml_search_function_t function);
index ab69570bb549fafe30bf673b0342eb4318539518..bf7e60230aef3192243e42c43e138009bfa18d2d 100644 (file)
@@ -228,7 +228,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_unbind_search_function_ptr(switch_xml
        return status;
 }
 
-SWITCH_DECLARE(switch_status_t) switch_xml_bind_search_function(switch_xml_search_function_t function, switch_xml_section_t sections, void *user_data)
+SWITCH_DECLARE(switch_status_t) switch_xml_bind_search_function_ret(switch_xml_search_function_t function, switch_xml_section_t sections, void *user_data, switch_xml_binding_t **ret)
 {
        switch_xml_binding_t *binding = NULL, *ptr = NULL;
        assert(function != NULL);
@@ -249,6 +249,11 @@ SWITCH_DECLARE(switch_status_t) switch_xml_bind_search_function(switch_xml_searc
        } else {
                BINDINGS = binding;
        }
+
+       if (ret) {
+               *ret = binding;
+       }
+
        switch_thread_rwlock_unlock(B_RWLOCK);
 
        return SWITCH_STATUS_SUCCESS;