sync with 0.8.11cvs36
authorPaul Mangan <paul@claws-mail.org>
Mon, 28 Apr 2003 07:40:12 +0000 (07:40 +0000)
committerPaul Mangan <paul@claws-mail.org>
Mon, 28 Apr 2003 07:40:12 +0000 (07:40 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/common/session.c
src/send_message.c

index b9a9d43..fc0157b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2003-04-28
+
+       * src/session.c:
+         session_send_msg()
+         session_send_data(): fixed a memory leak and data sending bug.
+       * src/send_message.c:
+         send_message_smtp(): fixed focus management.
+
 2003-04-25
 
        * src/smtp.[ch]: set the response string to SMTPSession::error_msg
index 193ea6f..43b0b20 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-28 [paul]      0.8.11claws119
+
+       * sync with 0.8.11cvs36
+               see ChangeLog 2003-04-28
+
 2003-04-27 [paul]      0.8.11claws118
 
        * more sync with 0.8.11cvs35
index 10a0f34..48e8488 100644 (file)
@@ -1,3 +1,11 @@
+2003-04-28
+
+       * src/session.c:
+         session_send_msg()
+         session_send_data(): ¥á¥â¥ê¥ê¡¼¥¯¤È¥Ç¡¼¥¿Á÷¿®¤Î¥Ð¥°¤ò½¤Àµ¡£
+       * src/send_message.c:
+         send_message_smtp(): ¥Õ¥©¡¼¥«¥¹´ÉÍý¤ò½¤Àµ¡£
+
 2003-04-25
 
        * src/smtp.[ch]: ¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤é±þÅúʸ»úÎó¤ò SMTPSession::error_msg
index db7924b..a502662 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws118
+EXTRA_VERSION=claws119
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 5b9ab77..3716046 100644 (file)
@@ -323,6 +323,7 @@ gint session_send_msg(Session *session, SessionMsgType type, const gchar *msg)
 {
        gchar *prefix;
        gchar *str;
+       gchar *cur;
        guint size;
        guint bytes_written;
 
@@ -341,18 +342,20 @@ gint session_send_msg(Session *session, SessionMsgType type, const gchar *msg)
                return -1;
        }
 
-       str = g_strdup_printf("%s %s\n", prefix, msg);
+       cur = str = g_strdup_printf("%s %s\n", prefix, msg);
        size = strlen(str);
 
        while (size > 0) {
-               if (g_io_channel_write(session->write_ch, str, size,
+               if (g_io_channel_write(session->write_ch, cur, size,
                                       &bytes_written)
                    != G_IO_ERROR_NONE || bytes_written == 0) {
                        g_warning("%s: sending message failed.\n",
                                  session->child_pid == 0 ? "child" : "parent");
+                       g_free(str);
                        return -1;
                }
                size -= bytes_written;
+               cur += bytes_written;
        }
 
        g_free(str);
@@ -438,6 +441,7 @@ gint session_start_tls(Session *session)
 gint session_send_data(Session *session, const guchar *data, guint size)
 {
        gchar *msg;
+       const guchar *cur = data;
        guint bytes_written;
        GIOError err;
 
@@ -447,7 +451,7 @@ gint session_send_data(Session *session, const guchar *data, guint size)
        g_free(msg);
 
        while (size > 0) {
-               if ((err = g_io_channel_write(session->write_ch, (guchar *)data,
+               if ((err = g_io_channel_write(session->write_ch, (guchar *)cur,
                                              size, &bytes_written))
                    != G_IO_ERROR_NONE || bytes_written == 0) {
                        g_warning("%s: sending data failed: %d\n",
@@ -456,6 +460,7 @@ gint session_send_data(Session *session, const guchar *data, guint size)
                        return -1;
                }
                size -= bytes_written;
+               cur += bytes_written;
                debug_print("session: %s: sent %d bytes of data\n",
                            session->child_pid == 0 ? "child" : "parent",
                            bytes_written);
index 2a682fc..6e38266 100644 (file)
@@ -428,7 +428,7 @@ gint send_message_smtp(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp)
        if (ret == -1) {
                manage_window_focus_in(dialog->dialog->window, NULL, NULL);
                send_put_error(session);
-               manage_window_focus_in(dialog->dialog->window, NULL, NULL);
+               manage_window_focus_out(dialog->dialog->window, NULL, NULL);
        }
 
        session_destroy(session);