From 6e5a929ee85280017b2f9cd69de9697e22f21e4c Mon Sep 17 00:00:00 2001 From: hiro Date: Fri, 25 Nov 2005 06:41:39 +0000 Subject: 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 --- libsylph/session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libsylph') 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) { -- cgit v1.2.3