[Freeswitch-svn] [commit] r5727 - in freeswitch/trunk/src: . include mod/endpoints/mod_sofia
Freeswitch SVN
greenlizard at freeswitch.org
Thu Sep 20 16:09:04 EDT 2007
Author: greenlizard
Date: Thu Sep 20 16:09:04 2007
New Revision: 5727
Modified:
freeswitch/trunk/src/include/switch_xml.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
freeswitch/trunk/src/switch_xml.c
Log:
patch which causes directory xml_curl requests to pass the sofia profile name
Modified: freeswitch/trunk/src/include/switch_xml.h
==============================================================================
--- freeswitch/trunk/src/include/switch_xml.h (original)
+++ freeswitch/trunk/src/include/switch_xml.h Thu Sep 20 16:09:04 2007
@@ -322,7 +322,8 @@
char *ip,
switch_xml_t *root,
switch_xml_t *domain,
- switch_xml_t *user);
+ switch_xml_t *user,
+ char *profile_name);
///\brief open a config in the core registry
///\param file_path the name of the config section e.g. modules.conf
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Thu Sep 20 16:09:04 2007
@@ -816,7 +816,7 @@
free(sql);
}
- if (switch_xml_locate_user(username, realm, ip, &xml, &domain, &user) != SWITCH_STATUS_SUCCESS) {
+ if (switch_xml_locate_user(username, realm, ip, &xml, &domain, &user, profile->name) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "can't find user [%s@%s]\n", username, realm);
ret = AUTH_FORBIDDEN;
goto end;
Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c (original)
+++ freeswitch/trunk/src/switch_xml.c Thu Sep 20 16:09:04 2007
@@ -1201,7 +1201,8 @@
char *ip,
switch_xml_t *root,
switch_xml_t *domain,
- switch_xml_t *user)
+ switch_xml_t *user,
+ char *profile_name)
{
char params[1024] = "";
switch_status_t status;
@@ -1209,7 +1210,7 @@
*user = NULL;
*domain = NULL;
- snprintf(params, sizeof(params), "user=%s&domain=%s&ip=%s", switch_str_nil(user_name), switch_str_nil(domain_name), switch_str_nil(ip));
+ snprintf(params, sizeof(params), "user=%s&domain=%s&ip=%s&profile=%s", switch_str_nil(user_name), switch_str_nil(domain_name), switch_str_nil(ip), profile_name);
if ((status = switch_xml_locate_domain(domain_name, params, root, domain)) != SWITCH_STATUS_SUCCESS) {
return status;
}
More information about the Freeswitch-svn
mailing list