diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-06-11 07:22:39 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-06-11 07:22:39 +0000 |
commit | 78d92947e3a35fe3ac0d31f64374a247ccc78e6b (patch) | |
tree | 96190dde011c98db8ffccecc66dc06ab284430cd /libsylph/socket.c | |
parent | b14cba8ad5b13bccb3eff9e114407d542bc20409 (diff) |
fixes stall of SMTP when sending via dialup connection.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1757 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/socket.c')
-rw-r--r-- | libsylph/socket.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libsylph/socket.c b/libsylph/socket.c index abf5671f..a1600381 100644 --- a/libsylph/socket.c +++ b/libsylph/socket.c @@ -568,6 +568,23 @@ guint sock_add_watch(SockInfo *sock, GIOCondition condition, SockFunc func, return g_io_add_watch(sock->sock_ch, condition, sock_watch_cb, sock); } +guint sock_add_watch_poll(SockInfo *sock, GIOCondition condition, SockFunc func, + gpointer data) +{ + GSource *source; + + sock->callback = func; + sock->condition = condition; + sock->data = data; + + source = g_source_new(&sock_watch_funcs, sizeof(SockSource)); + ((SockSource *)source)->sock = sock; + g_source_set_priority(source, G_PRIORITY_DEFAULT); + g_source_set_can_recurse(source, FALSE); + + return g_source_attach(source, NULL); +} + static gint fd_check_io(gint fd, GIOCondition cond) { struct timeval timeout; |