sync with 0.9.2cvs7
authorPaul Mangan <paul@claws-mail.org>
Fri, 27 Jun 2003 07:22:51 +0000 (07:22 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 27 Jun 2003 07:22:51 +0000 (07:22 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/common/session.c

index 4068a01..fe4a377 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-27
+
+       * src/session.c: session_read_data_cb(): clear Session::read_data_buf
+         before calling callbacks.
+
 2003-06-26
 
        * src/socket.c: made socket connection protocol independent.
index 7e1401a..92ed9b1 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-27 [paul]      0.9.0claws67
+
+       * sync with 0.9.2cvs7
+               see ChangeLog 2003-06-27
+
 2003-06-26 [christoph] 0.9.0claws66
 
        * src/folder.c
index bb0a7fd..9e19ada 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-27
+
+       * src/session.c: session_read_data_cb(): ¥³¡¼¥ë¥Ð¥Ã¥¯¤ò¸Æ¤ÖÁ°¤Ë
+         Session::read_data_buf ¤ò¥¯¥ê¥¢¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
 2003-06-26
 
        * src/socket.c: ¥½¥±¥Ã¥ÈÀܳ¤ò¥×¥í¥È¥³¥ëÆÈΩ¤Ë¤·¤¿¡£
index 8c56fd2..73b93d3 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws66
+EXTRA_VERSION=claws67
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 16815ba..fdd5e37 100644 (file)
@@ -460,6 +460,8 @@ static gboolean session_read_data_cb(GIOChannel     *source, GIOCondition condition,
        gint terminator_len;
        gboolean complete = FALSE;
        gint ret;
+       gchar *ret_data;
+       gint data_len;
 
        g_return_val_if_fail(condition == G_IO_IN, FALSE);
 
@@ -518,12 +520,16 @@ static gboolean session_read_data_cb(GIOChannel   *source, GIOCondition condition,
        }
 
        /* callback */
-       ret = session->recv_data_finished(session, data_buf->data,
-                                         data_buf->len - terminator_len);
-       session->recv_data_notify(session, data_buf->len - terminator_len,
+       ret_data = g_malloc(data_buf->len);
+       memcpy(ret_data, data_buf->data, data_buf->len);
+       data_len = data_buf->len - terminator_len;
+       g_byte_array_set_size(data_buf, 0);
+
+       ret = session->recv_data_finished(session, ret_data, data_len);
+       session->recv_data_notify(session, data_len,
                                  session->recv_data_notify_data);
 
-       g_byte_array_set_size(data_buf, 0);
+       g_free(ret_data);
 
        if (ret < 0)
                session->state = SESSION_ERROR;