diff options
author | Brendan Cully <brendan@kublai.com> | 2005-12-12 02:24:43 +0000 |
---|---|---|
committer | Brendan Cully <brendan@kublai.com> | 2005-12-12 02:24:43 +0000 |
commit | 314f76a3b3d0f495bf4dd9a2e668b1cf5e0e5f5a (patch) | |
tree | 135aed6efb3963544c37daf8d556a77c3572c4cf /mutt_tunnel.c | |
parent | 12f052b54a22dc458135154c57b6a03c98824159 (diff) |
IMAP IDLE support.
Diffstat (limited to 'mutt_tunnel.c')
-rw-r--r-- | mutt_tunnel.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mutt_tunnel.c b/mutt_tunnel.c index eddfbdf8..b43bbf93 100644 --- a/mutt_tunnel.c +++ b/mutt_tunnel.c @@ -45,6 +45,7 @@ static int tunnel_socket_open (CONNECTION*); static int tunnel_socket_close (CONNECTION*); static int tunnel_socket_read (CONNECTION* conn, char* buf, size_t len); static int tunnel_socket_write (CONNECTION* conn, const char* buf, size_t len); +static int tunnel_socket_poll (CONNECTION* conn); /* -- public functions -- */ int mutt_tunnel_socket_setup (CONNECTION *conn) @@ -53,6 +54,7 @@ int mutt_tunnel_socket_setup (CONNECTION *conn) conn->conn_close = tunnel_socket_close; conn->conn_read = tunnel_socket_read; conn->conn_write = tunnel_socket_write; + conn->conn_poll = tunnel_socket_poll; return 0; } @@ -175,3 +177,17 @@ static int tunnel_socket_write (CONNECTION* conn, const char* buf, size_t len) return rc; } + +static int tunnel_socket_poll (CONNECTION* conn) +{ + TUNNEL_DATA* tunnel = (TUNNEL_DATA*) conn->sockdata; + int ofd; + int rc; + + ofd = conn->fd; + conn->fd = tunnel->readfd; + rc = raw_socket_poll (conn); + conn->fd = ofd; + + return rc; +} |