[Freeswitch-svn] [commit] r10394 - in freeswitch/trunk/src: . include
FreeSWITCH SVN
anthm at freeswitch.org
Thu Nov 13 18:46:28 PST 2008
Author: anthm
Date: Thu Nov 13 21:46:28 2008
New Revision: 10394
Log:
doh
Modified:
freeswitch/trunk/src/include/switch_xml.h
freeswitch/trunk/src/switch_xml.c
Modified: freeswitch/trunk/src/include/switch_xml.h
==============================================================================
--- freeswitch/trunk/src/include/switch_xml.h (original)
+++ freeswitch/trunk/src/include/switch_xml.h Thu Nov 13 21:46:28 2008
@@ -353,7 +353,10 @@
///\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);
Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c (original)
+++ freeswitch/trunk/src/switch_xml.c Thu Nov 13 21:46:28 2008
@@ -228,7 +228,7 @@
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 @@
} else {
BINDINGS = binding;
}
+
+ if (ret) {
+ *ret = binding;
+ }
+
switch_thread_rwlock_unlock(B_RWLOCK);
return SWITCH_STATUS_SUCCESS;
More information about the Freeswitch-svn
mailing list