# HG changeset patch # User Eric Warmenhoven # Date 987540167 0 # Node ID 1edc8b545d6ff14049389c304f587e5c1b35a770 # Parent 15096a01cd2305dc8ef70283f8f3bd2b5b63dd51 [gaim-migrate @ 1732] bugfixes and mem plugs committer: Tailor Script diff -r 15096a01cd23 -r 1edc8b545d6f src/dialogs.c --- a/src/dialogs.c Mon Apr 16 17:04:15 2001 +0000 +++ b/src/dialogs.c Tue Apr 17 20:42:47 2001 +0000 @@ -3592,10 +3592,12 @@ FILE *fp_old, *fp_new; char filename[PATHSIZE]; char *name; + char *tmp; name = gtk_object_get_user_data(GTK_OBJECT(filesel)); - g_snprintf(filename, PATHSIZE, "%s/logs/%s.log", - gaim_user_dir(), normalize(name)); + tmp = gaim_user_dir(); + g_snprintf(filename, PATHSIZE, "%s/logs/%s.log", tmp, normalize(name)); + g_free(tmp); file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(filesel)); strncpy(path, file, PATHSIZE-1); @@ -3664,9 +3666,11 @@ gchar buf[256]; gchar filename[256]; GtkWidget *window; - - g_snprintf(filename, 256, "%s/logs/%s.log", - gaim_user_dir(), normalize(name)); + char *tmp; + + tmp = gaim_user_dir(); + g_snprintf(filename, 256, "%s/logs/%s.log", tmp, normalize(name)); + g_free(tmp); if ((remove(filename)) == -1) { g_snprintf(buf, 256, _("Unable to remove file %s - %s"), diff -r 15096a01cd23 -r 1edc8b545d6f src/server.c --- a/src/server.c Mon Apr 16 17:04:15 2001 +0000 +++ b/src/server.c Tue Apr 17 20:42:47 2001 +0000 @@ -657,14 +657,16 @@ g_snprintf(filename, 100, "%s.chat", b->name); fd = open_log_file(filename); - if (!(logging_options & OPT_LOG_STRIP_HTML)) - fprintf(fd, - "

---- New Conversation @ %s ----


\n", - full_date()); - else - fprintf(fd, "---- New Conversation @ %s ----\n", full_date()); + if (fd) { + if (!(logging_options & OPT_LOG_STRIP_HTML)) + fprintf(fd, + "

---- New Conversation @ %s ----


\n", + full_date()); + else + fprintf(fd, "---- New Conversation @ %s ----\n", full_date()); - fclose(fd); + fclose(fd); + } free(filename); }