changeset 190:876747813a60

2003-6-17 Brian Masney <masneyb@gftp.org> * 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
author masneyb
date Wed, 18 Jun 2003 01:07:51 +0000
parents 2b27d1370cdc
children 1e74b7796232
files ChangeLog lib/cache.c src/gtk/misc-gtk.c
diffstat 3 files changed, 24 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- 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 <masneyb@gftp.org>
+	* 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 <masneyb@gftp.org>
 	* 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
 
--- 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;
--- 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)