# HG changeset patch # User masneyb # Date 1055898471 0 # Node ID 876747813a6091e2db279696baac3940e63766a3 # Parent 2b27d1370cdc9f5a3361ef54274d264d71ffb34d 2003-6-17 Brian Masney * src/gtk/misc-gtk.c (ftp_log) - remote charset fixes for when the log message is generated inside a child thread * lib/cache.c - don't complain about not being able to open index.db diff -r 2b27d1370cdc -r 876747813a60 ChangeLog --- a/ChangeLog Tue Jun 17 14:18:05 2003 +0000 +++ b/ChangeLog Wed Jun 18 01:07:51 2003 +0000 @@ -1,3 +1,9 @@ +2003-6-17 Brian Masney + * src/gtk/misc-gtk.c (ftp_log) - remote charset fixes for when the log + message is generated inside a child thread + + * lib/cache.c - don't complain about not being able to open index.db + 2003-6-16 Brian Masney * lib/protocols.c (gftp_string_to_utf8) - return if request is NULL @@ -1026,7 +1032,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.94 2003/06/17 10:54:56 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.95 2003/06/18 01:07:49 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r 2b27d1370cdc -r 876747813a60 lib/cache.c --- a/lib/cache.c Tue Jun 17 14:18:05 2003 +0000 +++ b/lib/cache.c Wed Jun 18 01:07:51 2003 +0000 @@ -179,7 +179,7 @@ 0); indexfile = expand_path (BASE_CONF_DIR "/cache/index.db"); - if ((indexfd = gftp_fd_open (request, indexfile, O_RDONLY, 0)) == -1) + if ((indexfd = gftp_fd_open (NULL, indexfile, O_RDONLY, 0)) == -1) { g_free (indexfile); return (-1); @@ -282,7 +282,7 @@ return; oldindexfile = expand_path (BASE_CONF_DIR "/cache/index.db"); - if ((indexfd = gftp_fd_open (request, oldindexfile, O_RDONLY, 0)) == -1) + if ((indexfd = gftp_fd_open (NULL, oldindexfile, O_RDONLY, 0)) == -1) { g_free (oldindexfile); return; diff -r 2b27d1370cdc -r 876747813a60 src/gtk/misc-gtk.c --- a/src/gtk/misc-gtk.c Tue Jun 17 14:18:05 2003 +0000 +++ b/src/gtk/misc-gtk.c Wed Jun 18 01:07:51 2003 +0000 @@ -56,20 +56,6 @@ const char *descr; #endif - if (pthread_self () != main_thread_id) - { - newlog = g_malloc0 (sizeof (*newlog)); - newlog->type = level; - va_start (argp, string); - newlog->msg = g_strdup_vprintf (string, argp); - va_end (argp); - - pthread_mutex_lock (&log_mutex); - gftp_file_transfer_logs = g_list_append (gftp_file_transfer_logs, newlog); - pthread_mutex_unlock (&log_mutex); - return; - } - va_start (argp, string); if (strcmp (string, "%s") == 0) { @@ -98,6 +84,21 @@ } #endif + if (pthread_self () != main_thread_id) + { + newlog = g_malloc0 (sizeof (*newlog)); + newlog->type = level; + if (free_logstr) + newlog->msg = logstr; + else + newlog->msg = g_strdup (logstr); + + pthread_mutex_lock (&log_mutex); + gftp_file_transfer_logs = g_list_append (gftp_file_transfer_logs, newlog); + pthread_mutex_unlock (&log_mutex); + return; + } + if (gftp_logfd != NULL) { if (fwrite (logstr, strlen (logstr), 1, gftp_logfd) != 1)