]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Use const char, instead of passing func to switch_true
authorChris Parker <cparker@segv.org>
Tue, 16 Dec 2008 14:32:17 +0000 (14:32 +0000)
committerChris Parker <cparker@segv.org>
Tue, 16 Dec 2008 14:32:17 +0000 (14:32 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10793 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c

index d471a66e8893bfed6a923391c239d5554e89f65b..a863641fabaad62034ef778490f5c2b6cfdfb654 100644 (file)
@@ -156,7 +156,8 @@ static switch_status_t my_on_routing(switch_core_session_t *session)
        }
 
        if(channel) {
-               if(switch_true(switch_channel_get_variable(channel, "disable_radius_start"))) {
+               const char *disable_flag = switch_channel_get_variable(channel, "disable_radius_start");
+               if(switch_true(disable_flag)) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Not Sending RADIUS Start\n");
                        return SWITCH_STATUS_SUCCESS;
                }
@@ -393,12 +394,13 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
        }
 
 
-        if(channel) {
-                if(switch_true(switch_channel_get_variable(channel, "disable_radius_stop"))) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Not Sending RADIUS Stop\n");
-                        return SWITCH_STATUS_SUCCESS;
-                }
-        }
+       if(channel) {
+               const char *disable_flag = switch_channel_get_variable(channel, "disable_radius_stop");
+               if(switch_true(disable_flag)) {
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Not Sending RADIUS Stop\n");
+                       return SWITCH_STATUS_SUCCESS;
+               }
+       }
 
        switch_thread_rwlock_rdlock(globals.rwlock);