It is not used anywhere in the code.
Additionally, it does not interact correctly with
mutt_socket_readchar() and mutt_socket_readln_d(), which use an
internal input buffer: conn->inbuf.
If reading a specific chunksize is needed in future, the function can
be easily recreated to use the inbuf.
return rc;
}
-int mutt_socket_read (CONNECTION* conn, char* buf, size_t len)
-{
- int rc;
-
- if (conn->fd < 0)
- {
- dprint (1, (debugfile, "mutt_socket_read: attempt to read from closed connection\n"));
- return -1;
- }
-
- rc = conn->conn_read (conn, buf, len);
- /* EOF */
- if (rc == 0)
- {
- mutt_error (_("Connection to %s closed"), conn->account.host);
- mutt_sleep (2);
- }
- if (rc <= 0)
- mutt_socket_close (conn);
-
- return rc;
-}
-
int mutt_socket_write_d (CONNECTION *conn, const char *buf, int len, int dbg)
{
int rc;
int mutt_socket_open (CONNECTION* conn);
int mutt_socket_close (CONNECTION* conn);
-int mutt_socket_read (CONNECTION* conn, char* buf, size_t len);
int mutt_socket_poll (CONNECTION* conn, time_t wait_secs);
int mutt_socket_readchar (CONNECTION *conn, char *c);
#define mutt_socket_readln(A,B,C) mutt_socket_readln_d(A,B,C,MUTT_SOCK_LOG_CMD)