aboutsummaryrefslogtreecommitdiff
path: root/libsylph/session.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-01-19 07:45:18 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-01-19 07:45:18 +0000
commit3145665c922ead3c2de272eb0ad54c30c228046b (patch)
tree9189a3da73f4fef843e1225d15591ebf88ab9204 /libsylph/session.c
parentdeda2fa6804e19f6ae52291e9895c24cd0f7192d (diff)
win32: increased SO_SNDBUF and SO_RCVBUF (fixes low performance on sending data).
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1499 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/session.c')
-rw-r--r--libsylph/session.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libsylph/session.c b/libsylph/session.c
index 3109a478..73691dca 100644
--- a/libsylph/session.c
+++ b/libsylph/session.c
@@ -956,9 +956,11 @@ static gint session_write_buf(Session *session)
return 0;
}
+#define WRITE_DATA_BUFFSIZE 8192
+
static gint session_write_data(Session *session)
{
- gchar buf[SESSION_BUFFSIZE];
+ gchar buf[WRITE_DATA_BUFFSIZE];
gint write_len;
gint to_write_len;
@@ -967,7 +969,7 @@ static gint session_write_data(Session *session)
g_return_val_if_fail(session->write_data_len > 0, -1);
to_write_len = session->write_data_len - session->write_data_pos;
- to_write_len = MIN(to_write_len, SESSION_BUFFSIZE);
+ to_write_len = MIN(to_write_len, WRITE_DATA_BUFFSIZE);
if (fread(buf, to_write_len, 1, session->write_data_fp) < 1) {
g_warning("session_write_data: reading data from file failed\n");
session->state = SESSION_ERROR;