]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fixing issue with which xml pointer used. oops.
authorWilliam King <william.king@quentustech.com>
Mon, 13 Aug 2012 21:45:37 +0000 (14:45 -0700)
committerWilliam King <william.king@quentustech.com>
Mon, 13 Aug 2012 21:45:47 +0000 (14:45 -0700)
src/mod/xml_int/mod_xml_radius/mod_xml_radius.c

index 72ea209b6b863cbcecb049a9121f52e56d472161..9a5176bcee5497a9425d3a60c7415c78f8a377a9 100644 (file)
@@ -117,7 +117,7 @@ switch_status_t do_config()
 
        serv = timeout = deadtime = retries = dict = seq = 0;
        if ((tmp = switch_xml_dup(switch_xml_child(cfg, "auth_invite"))) != NULL ) {
-               if ( (server = switch_xml_child(xml, "connection")) != NULL) {
+               if ( (server = switch_xml_child(tmp, "connection")) != NULL) {
                                for (param = switch_xml_child(server, "param"); param; param = param->next) {
                                        char *var = (char *) switch_xml_attr_soft(param, "name");
                                        if ( strncmp(var, "authserver", 10) == 0 ) {
@@ -149,8 +149,8 @@ switch_status_t do_config()
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Could not find 'auth_invite' section in config file.\n");               
        }
        
-       if ((globals.auth_app_configs = switch_xml_dup(switch_xml_child(cfg, "auth_app"))) == NULL ) {
-               if ( (server = switch_xml_child(xml, "connection")) != NULL) {
+       if ((tmp = switch_xml_dup(switch_xml_child(cfg, "auth_app"))) == NULL ) {
+               if ( (server = switch_xml_child(tmp, "connection")) != NULL) {
                                for (param = switch_xml_child(server, "param"); param; param = param->next) {
                                        char *var = (char *) switch_xml_attr_soft(param, "name");
                                        if ( strncmp(var, "authserver", 10) == 0 ) {
@@ -169,7 +169,7 @@ switch_status_t do_config()
                                }
                                
                                if ( serv && timeout && deadtime && retries && dict && seq ) {
-                                       globals.auth_invite_configs = tmp;
+                                       globals.auth_app_configs = tmp;
                                } else {
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing a require section for radius connections\n");
                                        goto err;
@@ -182,8 +182,8 @@ switch_status_t do_config()
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Could not find 'auth_app' section in config file.\n");          
        }
        
-       if ((globals.acct_start_configs = switch_xml_dup(switch_xml_child(cfg, "acct_start"))) == NULL ) {
-               if ( (server = switch_xml_child(xml, "connection")) != NULL) {
+       if (( tmp = switch_xml_dup(switch_xml_child(cfg, "acct_start"))) == NULL ) {
+               if ( (server = switch_xml_child(tmp, "connection")) != NULL) {
                                for (param = switch_xml_child(server, "param"); param; param = param->next) {
                                        char *var = (char *) switch_xml_attr_soft(param, "name");
                                        if ( strncmp(var, "acctserver", 10) == 0 ) {
@@ -202,7 +202,7 @@ switch_status_t do_config()
                                }
                                
                                if ( serv && timeout && deadtime && retries && dict && seq ) {
-                                       globals.auth_invite_configs = tmp;
+                                       globals.acct_start_configs = tmp;
                                } else {
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing a require section for radius connections\n");
                                        goto err;
@@ -215,8 +215,8 @@ switch_status_t do_config()
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Could not find 'acct_start' section in config file.\n");                
        }
        
-       if ((globals.acct_end_configs = switch_xml_dup(switch_xml_child(cfg, "acct_end"))) == NULL ) {
-               if ( (server = switch_xml_child(xml, "connection")) != NULL) {
+       if (( tmp = switch_xml_dup(switch_xml_child(cfg, "acct_end"))) == NULL ) {
+               if ( (server = switch_xml_child(tmp, "connection")) != NULL) {
                                for (param = switch_xml_child(server, "param"); param; param = param->next) {
                                        char *var = (char *) switch_xml_attr_soft(param, "name");
                                        if ( strncmp(var, "acctserver", 10) == 0 ) {
@@ -235,7 +235,7 @@ switch_status_t do_config()
                                }
                                
                                if ( serv && timeout && deadtime && retries && dict && seq ) {
-                                       globals.auth_invite_configs = tmp;
+                                       globals.acct_end_configs = tmp;
                                } else {
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing a require section for radius connections\n");
                                        goto err;