Commit cbb803c6 cbb803c60d3bb3408a4baf1c6fbffb7eef878ee7 by Sergey Poznyakoff

(imap_get_fd): Removed. Use imap_get_fd2 instead

1 parent 6ba06219
...@@ -103,10 +103,11 @@ static int imap_body_read __P ((stream_t, char *, size_t, off_t, ...@@ -103,10 +103,11 @@ static int imap_body_read __P ((stream_t, char *, size_t, off_t,
103 size_t *)); 103 size_t *));
104 static int imap_body_size __P ((body_t, size_t *)); 104 static int imap_body_size __P ((body_t, size_t *));
105 static int imap_body_lines __P ((body_t, size_t *)); 105 static int imap_body_lines __P ((body_t, size_t *));
106 static int imap_body_fd __P ((stream_t, int *)); 106 static int imap_body_fd __P ((stream_t, int *, int *));
107 107
108 /* Helpers. */ 108 /* Helpers. */
109 static int imap_get_fd __P ((msg_imap_t, int *)); 109 static int imap_get_fd2 __P ((msg_imap_t msg_imap, int *pfd1,
110 int *pfd2));
110 static int imap_get_message0 __P ((msg_imap_t, message_t *)); 111 static int imap_get_message0 __P ((msg_imap_t, message_t *));
111 static int fetch_operation __P ((f_imap_t, msg_imap_t, char *, size_t, size_t *)); 112 static int fetch_operation __P ((f_imap_t, msg_imap_t, char *, size_t, size_t *));
112 static void free_subparts __P ((msg_imap_t)); 113 static void free_subparts __P ((msg_imap_t));
...@@ -1330,14 +1331,9 @@ imap_message_uid (message_t msg, size_t *puid) ...@@ -1330,14 +1331,9 @@ imap_message_uid (message_t msg, size_t *puid)
1330 static int 1331 static int
1331 imap_message_fd (stream_t stream, int *pfd, int *pfd2) 1332 imap_message_fd (stream_t stream, int *pfd, int *pfd2)
1332 { 1333 {
1333 if (pfd2)
1334 return ENOSYS;
1335 else
1336 {
1337 message_t msg = stream_get_owner (stream); 1334 message_t msg = stream_get_owner (stream);
1338 msg_imap_t msg_imap = message_get_owner (msg); 1335 msg_imap_t msg_imap = message_get_owner (msg);
1339 return imap_get_fd (msg_imap, pfd); 1336 return imap_get_fd2 (msg_imap, pfd, pfd2);
1340 }
1341 } 1337 }
1342 1338
1343 /* Mime. */ 1339 /* Mime. */
...@@ -2005,27 +2001,16 @@ imap_body_read (stream_t stream, char *buffer, size_t buflen, off_t offset, ...@@ -2005,27 +2001,16 @@ imap_body_read (stream_t stream, char *buffer, size_t buflen, off_t offset,
2005 } 2001 }
2006 2002
2007 static int 2003 static int
2008 imap_body_fd (stream_t stream, int *pfd) 2004 imap_body_fd (stream_t stream, int *pfd, int *pfd2)
2009 { 2005 {
2010 body_t body = stream_get_owner (stream); 2006 body_t body = stream_get_owner (stream);
2011 message_t msg = body_get_owner (body); 2007 message_t msg = body_get_owner (body);
2012 msg_imap_t msg_imap = message_get_owner (msg); 2008 msg_imap_t msg_imap = message_get_owner (msg);
2013 return imap_get_fd (msg_imap, pfd); 2009 return imap_get_fd2 (msg_imap, pfd, pfd2);
2014 } 2010 }
2015 2011
2016 2012
2017 static int 2013 static int
2018 imap_get_fd (msg_imap_t msg_imap, int *pfd)
2019 {
2020 if ( msg_imap
2021 && msg_imap->m_imap
2022 && msg_imap->m_imap->f_imap
2023 && msg_imap->m_imap->f_imap->folder)
2024 return stream_get_fd (msg_imap->m_imap->f_imap->folder->stream, pfd);
2025 return EINVAL;
2026 }
2027
2028 static int
2029 imap_get_fd2 (msg_imap_t msg_imap, int *pfd1, int *pfd2) 2014 imap_get_fd2 (msg_imap_t msg_imap, int *pfd1, int *pfd2)
2030 { 2015 {
2031 if ( msg_imap 2016 if ( msg_imap
......