From: Paul Mangan Date: Fri, 29 Mar 2002 07:23:03 +0000 (+0000) Subject: sync with 0.7.4cvs24 X-Git-Tag: rel_0_7_5~75 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=03697f0cc1b1cef9dc95adf784cfd42bb3992ee5 sync with 0.7.4cvs24 --- diff --git a/ChangeLog b/ChangeLog index 154bb65ab..070999c96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-03-29 + + * src/esmtp.c: esmtp_auth(): fixed a bug that some garbages are + shown after the decoded challenge string. Fixed a memory leak. + Removed strtok(). + * src/compose.c: compose_draft_cb(): mark draft messages as read. + * src/folderview.c: folderview_update_node(): disable emphasis + for Outbox and Draft folders. + 2002-03-28 * src/messageview.c: messageview_show(): fixed a memory leak. diff --git a/ChangeLog.claws b/ChangeLog.claws index e60fa086a..43d4ddacb 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,8 @@ +2002-03-29 [paul] 0.7.4claws53 + + * sync with 0.7.4cvs24 + see ChangeLog entry 2002-03-29 + 2002-03-28 [paul] 0.7.4claws52 * sync with 0.7.4cvs23 diff --git a/ChangeLog.jp b/ChangeLog.jp index 3bb7efd71..d86e73ea5 100644 --- a/ChangeLog.jp +++ b/ChangeLog.jp @@ -1,3 +1,12 @@ +2002-03-29 + + * src/esmtp.c: esmtp_auth(): ¥Ç¥³¡¼¥É¤µ¤ì¤¿¥Á¥ã¥ì¥ó¥¸Ê¸»úÎó¤Î¸å¤Ë + ¥´¥ß¤¬É½¼¨¤µ¤ì¤ë¥Ð¥°¤ò½¤Àµ¡£¥á¥â¥ê¥ê¡¼¥¯¤ò½¤Àµ¡£ strtok() ¤òºï½ü¡£ + * src/compose.c: compose_draft_cb(): Áð¹Æ¥á¥Ã¥»¡¼¥¸¤ò´ûÆɤȤ·¤Æ + ¥Þ¡¼¥¯¡£ + * src/folderview.c: folderview_update_node(): Á÷¿®¹µ¤ÈÁð¹Æ¥Õ¥©¥ë¥À + ¤Î¶¯Ä´¤ò¤·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£ + 2002-03-28 * src/messageview.c: messageview_show(): ¥á¥â¥ê¥ê¡¼¥¯¤ò½¤Àµ¡£ diff --git a/configure.in b/configure.in index 557639eae..a1133cb33 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ MINOR_VERSION=7 MICRO_VERSION=4 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws52 +EXTRA_VERSION=claws53 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/compose.c b/src/compose.c index aa019795b..e4d68375a 100644 --- a/src/compose.c +++ b/src/compose.c @@ -5883,6 +5883,8 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget) FolderItem *draft; gchar *tmp; gint msgnum; + gchar *draft_path; + FILE *fp; static gboolean lock = FALSE; if (lock) return; @@ -5923,6 +5925,20 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget) TRUE); } + draft_path = folder_item_get_path(draft); + if ((fp = procmsg_open_mark_file(draft_path, TRUE)) == NULL) + g_warning(_("can't open mark file\n")); + else { + MsgInfo newmsginfo; + + newmsginfo.msgnum = msgnum; + newmsginfo.flags.perm_flags = 0; + newmsginfo.flags.tmp_flags = 0; + procmsg_write_flags(&newmsginfo, fp); + fclose(fp); + } + g_free(draft_path); + folder_item_scan(draft); folderview_update_item(draft, TRUE); diff --git a/src/esmtp.c b/src/esmtp.c index 5c8a9c000..80eec301f 100644 --- a/src/esmtp.c +++ b/src/esmtp.c @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2001 Hiroyuki Yamamoto + * Copyright (C) 1999-2002 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -76,7 +76,6 @@ gint esmtp_auth(SockInfo *sock, SMTPAuthType authtype, guchar hexdigest[33]; gchar *challenge, *response, *response64; gint challengelen; - gchar *token; switch (authtype) { case SMTPAUTH_LOGIN: @@ -103,21 +102,22 @@ gint esmtp_auth(SockInfo *sock, SMTPAuthType authtype, case SMTPAUTH_CRAM_MD5: if (!strncmp(esmtp_response, "334 ", 4)) { /* remove 334 from esmtp_response */ - g_snprintf(buf, sizeof(buf), "%s",esmtp_response); - token = strtok(buf, " "); - token = strtok(NULL, " "); - challenge = g_malloc(strlen(token)+1); - challengelen = from64tobits(challenge,token); + gchar *p = esmtp_response + 4; + + challenge = g_malloc(strlen(p) + 1); + challengelen = from64tobits(challenge, p); + challenge[challengelen] = '\0'; if (verbose) - log_print("ESMTP< Decoded: %s\n", challenge); + log_print("ESMTP< [Decoded: %s]\n", challenge); g_snprintf(buf, sizeof(buf), "%s", passwd); md5_hex_hmac(hexdigest, challenge, challengelen, buf, strlen(passwd)); + g_free(challenge); response = g_strdup_printf("%s %s", userid, hexdigest); if (verbose) - log_print("ESMTP> Encoded %s\n",response); + log_print("ESMTP> [Encoded: %s]\n", response); response64 = g_malloc((strlen(response) + 3) * 2 + 1); to64frombits(response64, response, strlen(response)); diff --git a/src/folderview.c b/src/folderview.c index b5f9d56c9..cf73b827d 100644 --- a/src/folderview.c +++ b/src/folderview.c @@ -1121,9 +1121,10 @@ static void folderview_update_node(FolderView *folderview, GtkCTreeNode *node) gtk_ctree_node_set_text(ctree, node, COL_TOTAL, itos(item->total)); } - if (item->stype == F_TRASH) + if (item->stype == F_OUTBOX || item->stype == F_DRAFT || + item->stype == F_TRASH) { use_bold = use_color = FALSE; - if (item->stype == F_QUEUE) { + } else if (item->stype == F_QUEUE) { /* highlight queue folder if there are any messages */ use_bold = use_color = (item->total > 0); } else {