X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=nntp%2Fnntp.c;h=a5deac18b0a27438e0cdafb89fe6b53053e34480;hp=aa9d9150cf0718fab63c894d4a4c7410f9ea86ec;hb=98cf5779d8184a74541be1bc61d15c5f35efd310;hpb=23e6291cb5d5b4cd2008403d8b628007fd75ff23 diff --git a/nntp/nntp.c b/nntp/nntp.c index aa9d915..a5deac1 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -9,36 +9,21 @@ * please see the file GPL in the top level source directory. */ -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include +#include #include - #include +#include #include "mutt.h" #include "sort.h" #include "mx.h" #include "mx_nntp.h" -#include "rfc1524.h" #include "nntp.h" -#include "sidebar.h" #include "buffy.h" #include - -#include -#include -#include -#include - #define WANT_LISTGROUP_COMMAND 0 static unsigned int _checked = 0; @@ -104,7 +89,7 @@ static int nntp_auth (NNTP_SERVER * serv) } snprintf (buf, sizeof (buf), "AUTHINFO PASS %s\r\n", conn->account.pass); - mutt_socket_write_d (conn, buf, M_SOCK_LOG_FULL); + mutt_socket_write(conn, buf); if (mutt_socket_readln (buf, sizeof (buf), conn) < 0) { conn->account.flags = flags; return -1; @@ -342,8 +327,7 @@ static int mutt_nntp_fetch (NNTP_DATA * nntp_data, const char *query, char *msg, inbuf = p_new(char, sizeof(buf)); for (;;) { - chunk = mutt_socket_readln_d (buf, sizeof (buf), nntp_data->nserv->conn, - M_SOCK_LOG_HDR); + chunk = mutt_socket_readln(buf, sizeof (buf), nntp_data->nserv->conn); if (chunk < 0) break; @@ -542,7 +526,7 @@ static int nntp_parse_xover (CONTEXT * ctx, char *buf, HEADER * hdr) hdr->env = envelope_new(); hdr->env->newsgroups = m_strdup(nntp_data->group); - hdr->content = mutt_new_body (); + hdr->content = body_new(); hdr->content->type = TYPETEXT; hdr->content->subtype = m_strdup("plain"); hdr->content->encoding = ENC7BIT; @@ -1036,15 +1020,15 @@ int nntp_post (const char *msg) buf[len] = '\0'; } if (buf[1] == '.') - mutt_socket_write_d (nntp_data->nserv->conn, buf, M_SOCK_LOG_HDR); + mutt_socket_write(nntp_data->nserv->conn, buf); else - mutt_socket_write_d (nntp_data->nserv->conn, buf + 1, M_SOCK_LOG_HDR); + mutt_socket_write(nntp_data->nserv->conn, buf + 1); } fclose (f); if (buf[m_strlen(buf) - 1] != '\n') - mutt_socket_write_d (nntp_data->nserv->conn, "\r\n", M_SOCK_LOG_HDR); - mutt_socket_write_d (nntp_data->nserv->conn, ".\r\n", M_SOCK_LOG_HDR); + mutt_socket_write(nntp_data->nserv->conn, "\r\n"); + mutt_socket_write(nntp_data->nserv->conn, ".\r\n"); if (mutt_socket_readln (buf, sizeof (buf), nntp_data->nserv->conn) < 0) { mutt_error (_("Can't post article. Connection to %s lost."), nntp_data->nserv->conn->account.host); @@ -1302,7 +1286,7 @@ int nntp_check_newgroups (NNTP_SERVER * serv, int force) if (l->data && ((NNTP_DATA *) l->data)->subscribed) _nntp_check_mailbox (NULL, (NNTP_DATA *) l->data); } - sidebar_draw (CurrentMenu); + sidebar_draw (); } else if (!force) return 0;