]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
patch which causes directory xml_curl requests to pass the sofia profile name
authorTraun Leyden <tleyden@branchcut.com>
Thu, 20 Sep 2007 20:09:04 +0000 (20:09 +0000)
committerTraun Leyden <tleyden@branchcut.com>
Thu, 20 Sep 2007 20:09:04 +0000 (20:09 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5727 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_xml.h
src/mod/endpoints/mod_sofia/sofia_reg.c
src/switch_xml.c

index e7b1eb7b2412a8eabbfb75c669f1eb1e0e2d6a54..6906a7ba853c6b0292898e876f0a8fb75a0c9d1f 100644 (file)
@@ -322,7 +322,8 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate_user(char *user_name, char *do
                                                                                                           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
index e6916fe62cd17f4d23513549bc0a6786532020bc..60c8af3dc5e13da0382a3fb44fc3d3b180e6eaa0 100644 (file)
@@ -816,7 +816,7 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co
                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;
index 82a3a0810aaf98903b97aca446ae65459f8073f5..d33ce357b10f1ce23ed75889559977f3fd6cb78a 100644 (file)
@@ -1201,7 +1201,8 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate_user(char *user_name, char *do
                                                                                                           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 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate_user(char *user_name, char *do
        *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;
        }