diff options
Diffstat (limited to 'xrdp/xrdp_bitmap.c')
| -rw-r--r-- | xrdp/xrdp_bitmap.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/xrdp/xrdp_bitmap.c b/xrdp/xrdp_bitmap.c index cee6f40b..d568345f 100644 --- a/xrdp/xrdp_bitmap.c +++ b/xrdp/xrdp_bitmap.c @@ -24,6 +24,7 @@ */ #include "xrdp.h" +#include "log.h" static int g_crc_seed = 0xffffffff; static int g_crc_table[256] = @@ -351,8 +352,8 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette) if (!g_file_exist(filename)) { - g_writeln("xrdp_bitmap_load: error bitmap file [%s] does not exist", - filename); + log_message(LOG_LEVEL_ERROR, + "xrdp_bitmap_load: error bitmap file [%s] does not exist",filename); return 1; } s = (struct stream *)NULL; @@ -362,15 +363,15 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette) /* read file type */ if (g_file_read(fd, type1, 2) != 2) { - g_writeln("xrdp_bitmap_load: error bitmap file [%s] read error", - filename); + log_message(LOG_LEVEL_ERROR, + "xrdp_bitmap_load: error bitmap file [%s] read error",filename); g_file_close(fd); return 1; } if ((type1[0] != 'B') || (type1[1] != 'M')) { - g_writeln("xrdp_bitmap_load: error bitmap file [%s] not BMP file", - filename); + log_message(LOG_LEVEL_ERROR, + "xrdp_bitmap_load: error bitmap file [%s] not BMP file", filename); g_file_close(fd); return 1; } @@ -397,8 +398,8 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette) if ((header.bit_count != 4) && (header.bit_count != 8) && (header.bit_count != 24)) { - g_writeln("xrdp_bitmap_load: error bitmap file [%s] bad bpp %d", - filename, header.bit_count); + log_message(LOG_LEVEL_ERROR, + "xrdp_bitmap_load: error bitmap file [%s] bad bpp %d",filename, header.bit_count); free_stream(s); g_file_close(fd); return 1; @@ -416,8 +417,8 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette) k = g_file_read(fd, s->data + i * size, size); if (k != size) { - g_writeln("xrdp_bitmap_load: error bitmap file [%s] read", - filename); + log_message(LOG_LEVEL_ERROR, + "xrdp_bitmap_load: error bitmap file [%s] read",filename); } } for (i = 0; i < self->height; i++) @@ -470,8 +471,8 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette) k = g_file_read(fd, s->data + i * size, size); if (k != size) { - g_writeln("xrdp_bitmap_load: error bitmap file [%s] read", - filename); + log_message(LOG_LEVEL_ERROR, + "xrdp_bitmap_load: error bitmap file [%s] read", filename); } } for (i = 0; i < self->height; i++) @@ -520,8 +521,8 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette) k = g_file_read(fd, s->data + i * size, size); if (k != size) { - g_writeln("xrdp_bitmap_load: error bitmap file [%s] read", - filename); + log_message(LOG_LEVEL_ERROR, + "xrdp_bitmap_load: error bitmap file [%s] read",filename); } } for (i = 0; i < self->height; i++) @@ -563,8 +564,8 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette) } else { - g_writeln("xrdp_bitmap_load: error loading bitmap from file [%s]", - filename); + log_message(LOG_LEVEL_ERROR, + "xrdp_bitmap_load: error loading bitmap from file [%s]", filename); return 1; } return 0; |
