-#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);
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);
strfcpy (inbuf + lenbuf, p, sizeof (buf));
if (chunk >= sizeof (buf)) {
strfcpy (inbuf + lenbuf, p, sizeof (buf));
if (chunk >= sizeof (buf)) {
*colon = '\0';
colon++;
nntp_get_status (ctx, h, p, atoi (colon));
*colon = '\0';
colon++;
nntp_get_status (ctx, h, p, atoi (colon));
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));
/* create NNTP-specific state struct if nof found in list */
if ((nntp_data = (NNTP_DATA *) hash_find (serv->newsgroups, buf)) == NULL) {
/* create NNTP-specific state struct if nof found in list */
if ((nntp_data = (NNTP_DATA *) hash_find (serv->newsgroups, buf)) == NULL) {
nntp_data->group = (char *) nntp_data + sizeof (NNTP_DATA);
strcpy (nntp_data->group, buf);
hash_insert (serv->newsgroups, nntp_data->group, nntp_data, 0);
nntp_data->group = (char *) nntp_data + sizeof (NNTP_DATA);
strcpy (nntp_data->group, buf);
hash_insert (serv->newsgroups, nntp_data->group, nntp_data, 0);
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);
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);
if (mutt_socket_readln (buf, sizeof (buf), nntp_data->nserv->conn) < 0) {
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);
if (mutt_socket_readln (buf, sizeof (buf), nntp_data->nserv->conn) < 0) {
nntp_data->group = (char *) nntp_data + sizeof (NNTP_DATA);
strcpy (nntp_data->group, group);
nntp_data->nserv = s;
nntp_data->group = (char *) nntp_data + sizeof (NNTP_DATA);
strcpy (nntp_data->group, group);
nntp_data->nserv = s;