aboutsummaryrefslogtreecommitdiff
path: root/libsylph/session.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-11-25 06:41:39 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-11-25 06:41:39 +0000
commit6e5a929ee85280017b2f9cd69de9697e22f21e4c (patch)
tree11c71ac65eaef0e49fda0fe8a6bd3e780c756967 /libsylph/session.c
parent5a8dabecb4c9ab93194fff4dcd9d6f12f550e02a (diff)
fixed a bug that lost first part of message data on receiving.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@776 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/session.c')
-rw-r--r--libsylph/session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsylph/session.c b/libsylph/session.c
index 1ded2ee6..77209c96 100644
--- a/libsylph/session.c
+++ b/libsylph/session.c
@@ -485,7 +485,7 @@ static gboolean session_recv_data_as_file_idle_cb(gpointer data)
Session *session = SESSION(data);
gboolean ret;
- ret = session_read_data_cb(session->sock, G_IO_IN, session);
+ ret = session_read_data_as_file_cb(session->sock, G_IO_IN, session);
if (ret == TRUE)
session->io_tag = sock_add_watch(session->sock, G_IO_IN,
@@ -708,7 +708,7 @@ static gboolean session_read_data_as_file_cb(SockInfo *source,
session_set_timeout(session, session->timeout_interval);
- if (session->read_buf_len != 0)
+ if (session->read_buf_len > 0)
g_print("already read %d bytes\n", session->read_buf_len);
if (session->read_buf_len == 0) {