mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-13 13:07:06 +00:00
code analysis, clean up asserts related to switch_core_session_get_channel.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7402 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
c8dd27cdd1
commit
482badffca
44 files changed
+506
-1661
No files matched your search
@@ -52,13 +52,8 @@ SWITCH_STANDARD_APP(dial_function)
|
||||
int argc;
|
||||
char *argv[4] = { 0 };
|
||||
char *mydata;
|
||||
switch_channel_t *channel;
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
|
||||
if (data && (mydata = switch_core_session_strdup(session, data))) {
|
||||
if ((argc = switch_separate_string(mydata, '|', argv, (sizeof(argv) / sizeof(argv[0])))) < 2) {
|
||||
goto error;
|
||||
@@ -89,11 +84,7 @@ SWITCH_STANDARD_APP(avoid_function)
|
||||
{
|
||||
void *y = NULL;
|
||||
int x = 0;
|
||||
|
||||
switch_channel_t *channel;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
|
||||
for (x = 0; x < 5; x++) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Avoiding initial deadlock on channel %s.\n", switch_channel_get_name(channel));
|
||||
@@ -109,11 +100,7 @@ SWITCH_STANDARD_APP(goto_function)
|
||||
int argc;
|
||||
char *argv[3] = { 0 };
|
||||
char *mydata;
|
||||
switch_channel_t *channel;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
|
||||
if (data && (mydata = switch_core_session_strdup(session, data))) {
|
||||
if ((argc = switch_separate_string(mydata, '|', argv, (sizeof(argv) / sizeof(argv[0])))) < 1) {
|
||||
goto error;
|
||||
@@ -134,7 +121,7 @@ SWITCH_STANDARD_APP(goto_function)
|
||||
SWITCH_STANDARD_DIALPLAN(asterisk_dialplan_hunt)
|
||||
{
|
||||
switch_caller_extension_t *extension = NULL;
|
||||
switch_channel_t *channel;
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
char *cf = "extensions.conf";
|
||||
switch_config_t cfg;
|
||||
char *var, *val;
|
||||
@@ -144,9 +131,6 @@ SWITCH_STANDARD_DIALPLAN(asterisk_dialplan_hunt)
|
||||
cf = arg;
|
||||
}
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
switch_assert(channel != NULL);
|
||||
|
||||
if (!caller_profile) {
|
||||
caller_profile = switch_channel_get_caller_profile(channel);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user