X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=nntp%2Fnntp.c;h=34d7746dd7476e29a247331d0ade39621ea8423b;hb=10b7d54ecaa5c54622bf1239b57fa2e3359db0e1;hp=5ad2719dd53bd56e0a87067342be9c78dbba8e25;hpb=238b70e39b78f585c586bd51aef41988b3cc73d1;p=apps%2Fmadmutt.git diff --git a/nntp/nntp.c b/nntp/nntp.c index 5ad2719..34d7746 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -18,14 +18,14 @@ #include #include +#include + #include "mutt.h" #include "mutt_curses.h" #include "sort.h" #include "mx.h" #include "mx_nntp.h" -#include "mime.h" #include "rfc1524.h" -#include "rfc2047.h" #include "nntp.h" #include "sidebar.h" #include "buffy.h" @@ -159,9 +159,9 @@ static int nntp_connect_and_auth (NNTP_SERVER * serv) else if (!m_strncmp("201", buf, 3)) mutt_message (_("Connected to %s. Posting NOT ok."), conn->account.host); else { - mutt_socket_close (conn); - str_skip_trailws (buf); - mutt_error ("%s", buf); + mutt_socket_close(conn); + m_strrtrim(buf); + mutt_error("%s", buf); sleep (2); return -1; } @@ -583,7 +583,7 @@ static int nntp_parse_xover (CONTEXT * ctx, char *buf, HEADER * hdr) hdr->env->subject = m_strdup(b); break; case 2: - rfc822_free_address (&hdr->env->from); + address_delete (&hdr->env->from); hdr->env->from = rfc822_parse_adrlist (hdr->env->from, b); /* same as for mutt_parse_rfc822_line(): * don't leave from info NULL if there's an invalid address (or @@ -591,7 +591,7 @@ static int nntp_parse_xover (CONTEXT * ctx, char *buf, HEADER * hdr) * and mark mail/(esp.) news article as your own. aaargh! this * bothered me for _years_ */ if (!hdr->env->from) { - hdr->env->from = rfc822_new_address (); + hdr->env->from = address_new (); hdr->env->from->personal = m_strdup(b); } break; @@ -620,7 +620,7 @@ static int nntp_parse_xover (CONTEXT * ctx, char *buf, HEADER * hdr) hdr->env->xref = m_strdup(b); nntp_parse_xref (ctx, nntp_data->group, b, hdr); } - rfc2047_decode_envelope (hdr->env); + rfc2047_decode_envelope(hdr->env); if (!*p) return -1; b = p;