]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11785 [mod_format_cdr, mod_local_stream] fix dead assignment
authorChris Rienzo <chris@signalwire.com>
Fri, 3 May 2019 00:11:58 +0000 (00:11 +0000)
committerAndrey Volk <andywolk@gmail.com>
Wed, 17 Jul 2019 17:50:43 +0000 (21:50 +0400)
src/mod/event_handlers/mod_format_cdr/mod_format_cdr.c
src/mod/formats/mod_local_stream/mod_local_stream.c

index 1031caa0699e19b9719152e4d602b9de25f94415..0a6ff80c49e886d2e4edbfe48d3341f7af14738f 100644 (file)
@@ -292,7 +292,6 @@ static switch_status_t my_on_reporting_cb(switch_core_session_t *session, cdr_pr
                                }
                                wrote++;
                                close(fd);
-                               fd = -1;
                        } else {
                                char ebuf[512] = { 0 };
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error writing [%s][%s]\n",
@@ -462,7 +461,6 @@ static switch_status_t my_on_reporting_cb(switch_core_session_t *session, cdr_pr
                                }
                                wrote++;
                                close(fd);
-                               fd = -1;
                        } else {
                                char ebuf[512] = { 0 };
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error![%s]\n",
index bb5fde7568c3a19098e99da41147b0aead9ab330..9e9a7aa3c939756b9a272fbfe5aabb5505711ec1 100644 (file)
@@ -496,7 +496,6 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
                                if (source->hup) {
                                        source->hup = 0;
                                        if (is_open) {
-                                               is_open = 0;
 
                                                switch_core_file_close(use_fh);
                                                flush_video_queue(source->video_q);
@@ -560,7 +559,6 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
 
                                                if (use_fh == &source->chime_fh) {
                                                        source->chime_counter = source->rate * source->chime_freq;
-                                                       use_fh = &fh;
                                                } else {
                                                        is_open = 0;
                                                }