aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-23 01:27:30 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-23 01:27:30 +0000
commitbe3e205455951322ee435203f1e707f4fb3ee51b (patch)
treec323cff091f9a04151a2c73de172631fec00bf30
parent4745ae2d48d2f2aac5f80e41b91add65e3e00c56 (diff)
win32: fixed a bug that the timeout didn't work.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1556 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog4
-rw-r--r--ChangeLog.ja4
-rw-r--r--libsylph/session.c12
3 files changed, 14 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 9b5cf7cf..617dba35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-02-22
+
+ * libsylph/session.c: win32: fixed a bug that the timeout didn't work.
+
2007-02-21
* src/addressbook.c
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 5b587a07..30d23b74 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,7 @@
+2007-02-22
+
+ * libsylph/session.c: win32: タイムアウトが機能しないバグを修正。
+
2007-02-21
* src/addressbook.c
diff --git a/libsylph/session.c b/libsylph/session.c
index 5ebb564d..2252b65b 100644
--- a/libsylph/session.c
+++ b/libsylph/session.c
@@ -555,8 +555,6 @@ static gboolean session_read_msg_cb(SockInfo *source, GIOCondition condition,
g_return_val_if_fail(condition == G_IO_IN, FALSE);
- session_set_timeout(session, session->timeout_interval);
-
if (session->read_buf_len == 0) {
gint read_len;
@@ -583,6 +581,8 @@ static gboolean session_read_msg_cb(SockInfo *source, GIOCondition condition,
session->read_buf_len = read_len;
}
+ session_set_timeout(session, session->timeout_interval);
+
if ((newline = memchr(session->read_buf_p, '\n', session->read_buf_len))
!= NULL)
line_len = newline - session->read_buf_p + 1;
@@ -643,8 +643,6 @@ static gboolean session_read_data_cb(SockInfo *source, GIOCondition condition,
g_return_val_if_fail(condition == G_IO_IN, FALSE);
- session_set_timeout(session, session->timeout_interval);
-
if (session->read_buf_len == 0) {
gint read_len;
@@ -671,6 +669,8 @@ static gboolean session_read_data_cb(SockInfo *source, GIOCondition condition,
session->read_buf_len = read_len;
}
+ session_set_timeout(session, session->timeout_interval);
+
data_buf = session->read_data_buf;
terminator_len = strlen(session->read_data_terminator);
@@ -758,8 +758,6 @@ static gboolean session_read_data_as_file_cb(SockInfo *source,
g_return_val_if_fail(condition == G_IO_IN, FALSE);
- session_set_timeout(session, session->timeout_interval);
-
if (session->read_buf_len == 0) {
read_len = sock_read(session->sock, session->read_buf_p,
READ_BUF_LEFT());
@@ -784,6 +782,8 @@ static gboolean session_read_data_as_file_cb(SockInfo *source,
session->read_buf_len = read_len;
}
+ session_set_timeout(session, session->timeout_interval);
+
terminator_len = strlen(session->read_data_terminator);
if (session->read_buf_len == 0)