-#ifdef DEBUG
-static void nntp_error (const char *where, const char *msg)
-{
- dprint (1,
- (debugfile, "nntp_error(): unexpected response in %s: %s\n", where,
- msg));
+static void nntp_error (const char *where, const char *msg) {
+ debug_print (1, ("unexpected response in %s: %s\n", where, msg));
- if (debuglevel < M_SOCK_LOG_FULL)
- dprint (M_SOCK_LOG_CMD, (debugfile, "> AUTHINFO PASS *\n"));
+ if (DebugLevel < M_SOCK_LOG_FULL)
+ debug_print (M_SOCK_LOG_CMD, ("> AUTHINFO PASS *\n"));
#endif
snprintf (buf, sizeof (buf), "AUTHINFO PASS %s\r\n", conn->account.pass);
mutt_socket_write_d (conn, buf, M_SOCK_LOG_FULL);
#endif
snprintf (buf, sizeof (buf), "AUTHINFO PASS %s\r\n", conn->account.pass);
mutt_socket_write_d (conn, buf, M_SOCK_LOG_FULL);
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
mutt_message (_("Connected to %s. Posting NOT ok."), conn->account.host);
else {
mutt_socket_close (conn);
mutt_message (_("Connected to %s. Posting NOT ok."), conn->account.host);
else {
mutt_socket_close (conn);
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
mutt_socket_write (conn, "LISTGROUP\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return (nntp_connect_error (serv));
mutt_socket_write (conn, "LISTGROUP\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return (nntp_connect_error (serv));
serv->hasLISTGROUP = 1;
mutt_socket_write (conn, "XOVER\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
serv->hasLISTGROUP = 1;
mutt_socket_write (conn, "XOVER\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
serv->hasXOVER = 1;
mutt_socket_write (conn, "XPAT\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
serv->hasXOVER = 1;
mutt_socket_write (conn, "XPAT\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
serv->hasXPAT = 1;
mutt_socket_write (conn, "XGTITLE +\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
serv->hasXPAT = 1;
mutt_socket_write (conn, "XGTITLE +\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
do {
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
do {
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
ret = mutt_nntp_fetch (nntp_data, buf, NULL, nntp_read_tempfile, f, 0);
if (ret) {
ret = mutt_nntp_fetch (nntp_data, buf, NULL, nntp_read_tempfile, f, 0);
if (ret) {
- dprint (2, (debugfile, "group: %s, desc: %s\n", line, d));
+ debug_print (2, ("group: %s, desc: %s\n", line, d));
if ((data = (NNTP_DATA *) hash_find (news->newsgroups, line)) != NULL &&
mutt_strcmp (d, data->desc)) {
FREE (&data->desc);
if ((data = (NNTP_DATA *) hash_find (news->newsgroups, line)) != NULL &&
mutt_strcmp (d, data->desc)) {
FREE (&data->desc);
mutt_error (_("Newsgroup %s not found on server %s"),
nntp_data->group, serv->conn->account.host);
mutt_error (_("Newsgroup %s not found on server %s"),
nntp_data->group, serv->conn->account.host);
if (ret == 1) {
mutt_error (_("Article %d not found on server"),
ctx->hdrs[msgno]->article_num);
if (ret == 1) {
mutt_error (_("Article %d not found on server"),
ctx->hdrs[msgno]->article_num);