]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
avoiding deadlock
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 20 Jun 2007 14:50:02 +0000 (14:50 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 20 Jun 2007 14:50:02 +0000 (14:50 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5423 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_channel.c

index 4bf7337ace5ff6386f01825ec7fb5564f71395f4..f8289eb5af3c20c882f6b926e11a2ebf394e8fd7 100644 (file)
@@ -319,9 +319,10 @@ SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, co
        if (!(v = switch_core_hash_find(channel->variables, varname))) {
                if (!channel->caller_profile || !(v = switch_caller_get_field_by_name(channel->caller_profile, varname))) {
                        if (!strcmp(varname, "base_dir")) {
-                               return SWITCH_GLOBAL_dirs.base_dir;
+                               v = SWITCH_GLOBAL_dirs.base_dir;
+                       } else {
+                               v = switch_core_get_variable(varname);
                        }
-                       v = switch_core_get_variable(varname);
                }
        }
        switch_mutex_unlock(channel->profile_mutex);