[mod_conference] Fix dead nested assignments

This commit is contained in:
Andrey Volk 2022-01-06 20:54:33 +03:00
parent cd86de2f1f
commit 1e5e3216d8
4 changed files with 6 additions and 8 deletions

View File

@ -2020,7 +2020,6 @@ switch_status_t conference_api_sub_vid_layout(conference_obj_t *conference, swit
}
if (!strncasecmp(argv[2], "group", 5)) {
layout_group_t *lg = NULL;
int xx = 4;
if ((group_name = strchr(argv[2], ':'))) {
@ -2034,7 +2033,7 @@ switch_status_t conference_api_sub_vid_layout(conference_obj_t *conference, swit
stream->write_function(stream, "-ERR Group name not specified.\n");
return SWITCH_STATUS_SUCCESS;
} else {
if (((lg = switch_core_hash_find(conference->layout_group_hash, group_name)))) {
if (switch_core_hash_find(conference->layout_group_hash, group_name)) {
if (conference_utils_test_flag(conference, CFLAG_PERSONAL_CANVAS)) {
stream->write_function(stream, "-ERR Change personal canvas to layout group [%s]\n", group_name);
conference->video_layout_group = switch_core_strdup(conference->pool, group_name);

View File

@ -305,7 +305,7 @@ void conference_event_mod_channel_handler(const char *event_channel, cJSON *json
} else if (!strcasecmp(action, "shift-click-layer")) {
} else if (!strcasecmp(action, "reset-layer") || !strcasecmp(action, "layer-pan-x") || !strcasecmp(action, "layer-pan-y")) {
cJSON *v;
int layer_id = 0, canvas_id = 0, metric = 0, absolute = 0;
int layer_id = 0, canvas_id = 0, metric = 0;
const char *i = "i", *xy = "";
if ((v = cJSON_GetObjectItem(data, "layerID"))) {
@ -321,7 +321,7 @@ void conference_event_mod_channel_handler(const char *event_channel, cJSON *json
}
if ((v = cJSON_GetObjectItem(data, "absolute"))) {
if ((absolute = v->valueint)) {
if (v->valueint) {
i = "";
}
}

View File

@ -592,7 +592,7 @@ void conference_member_add_file_data(conference_member_t *member, int16_t *data,
if (switch_core_speech_read_tts(member->fnode->sh, file_frame, &speech_len, &flags) == SWITCH_STATUS_SUCCESS) {
file_sample_len = file_data_len / 2 / member->conference->channels;
} else {
file_sample_len = file_data_len = 0;
file_sample_len = 0;
}
} else if (member->fnode->type == NODE_TYPE_FILE) {
switch_core_file_read(&member->fnode->fh, file_frame, &file_sample_len);

View File

@ -490,7 +490,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
} else {
file_sample_len = file_data_len = 0;
file_sample_len = 0;
}
} else if (conference->fnode->type == NODE_TYPE_FILE) {
switch_core_file_read(&conference->fnode->fh, file_frame, &file_sample_len);
@ -1891,7 +1891,6 @@ switch_status_t conference_text_thread_callback(switch_core_session_t *session,
/* Application interface function that is called from the dialplan to join the channel to a conference */
SWITCH_STANDARD_APP(conference_function)
{
switch_codec_t *read_codec = NULL;
//uint32_t flags = 0;
conference_member_t member = { 0 };
conference_obj_t *conference = NULL;
@ -1931,7 +1930,7 @@ SWITCH_STANDARD_APP(conference_function)
}
/* Save the original read codec. */
if (!(read_codec = switch_core_session_get_read_codec(session))) {
if (!switch_core_session_get_read_codec(session)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Channel has no media!\n");
goto end;
}