]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7513: cleanup
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 17 Feb 2015 02:46:52 +0000 (20:46 -0600)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:02 +0000 (12:47 -0500)
src/mod/applications/mod_conference/mod_conference.c
src/switch_core_video.c

index 4172078b9aa716b7e6135e7008e29d2b8482f438..25d3822b614e5819da6cc4f5a7221e2b9ed06165 100644 (file)
@@ -1078,6 +1078,10 @@ static void layer_set_logo(conference_member_t *member, mcu_layer_t *layer, cons
                goto end;
        }
 
+       if (path) {
+               switch_img_free(&layer->logo_img);
+       }
+
        if (*path == '{') {
                dup = strdup(path);
                path = dup;
@@ -1117,12 +1121,6 @@ static void layer_set_logo(conference_member_t *member, mcu_layer_t *layer, cons
                }
        }
 
-
-       if (path) {
-               switch_img_free(&layer->logo_img);
-       }
-
-
        if (path && strcasecmp(path, "clear")) {
                layer->logo_img = switch_img_read_png(path);
        }
@@ -8432,8 +8430,10 @@ static switch_status_t conf_api_sub_vid_logo_img(conference_member_t *member, sw
        }
 
        layer = &member->conference->canvas->layers[member->video_layer_id];
-
-       member->video_logo = switch_core_strdup(member->pool, text);
+       
+       if (!strcasecmp(text, "clear")) {
+               member->video_logo = switch_core_strdup(member->pool, text);
+       }
 
        layer_set_logo(member, layer, text);
 
index f700be80221bc4a35044d0f81f2335fbacb31b05..424afe0f688955fc7470816eef00c1e8588c5b78 100644 (file)
@@ -856,30 +856,30 @@ SWITCH_DECLARE(switch_image_t *) switch_img_read_png(const char* file_name)
        /* open file and test for it being a png */
        FILE *fp = fopen(file_name, "rb");
        if (!fp) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "File %s could not be opened for reading", file_name);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "File %s could not be opened for reading\n", file_name);
                goto end;
        }
 
        fread(header, 1, 8, fp);
        if (png_sig_cmp(header, 0, 8)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "File %s is not recognized as a PNG file", file_name);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "File %s is not recognized as a PNG file\n", file_name);
                goto end;
        }
 
        png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
        if (!png_ptr) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "png_create_read_struct failed");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "png_create_read_struct failed\n");
                goto end;
        }
 
        info_ptr = png_create_info_struct(png_ptr);
        if (!info_ptr) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "png_create_info_struct failed");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "png_create_info_struct failed\n");
                goto end;
        }
 
        if (setjmp(png_jmpbuf(png_ptr))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error during init_io");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error during init_io\n");
                goto end;
        }