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, "XOVER\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
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;
#if WANT_LISTGROUP_COMMAND
mutt_socket_write (conn, "LISTGROUP\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return (nntp_connect_error (serv));
serv->hasXPAT = 1;
#if WANT_LISTGROUP_COMMAND
mutt_socket_write (conn, "LISTGROUP\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return (nntp_connect_error (serv));
serv->hasLISTGROUP = 1;
#endif
mutt_socket_write (conn, "XGTITLE +\r\n");
if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
return nntp_connect_error (serv);
serv->hasLISTGROUP = 1;
#endif
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);
chunk = mutt_socket_readln_d (buf, sizeof (buf), nntp_data->nserv->conn,
M_SOCK_LOG_HDR);
if (chunk < 0)
chunk = mutt_socket_readln_d (buf, sizeof (buf), nntp_data->nserv->conn,
M_SOCK_LOG_HDR);
if (chunk < 0)
*colon = '\0';
colon++;
nntp_get_status (ctx, h, b, atoi (colon));
*colon = '\0';
colon++;
nntp_get_status (ctx, h, b, atoi (colon));
d++;
debug_print (2, ("group: %s, desc: %s\n", line, d));
if ((data = (NNTP_DATA *) hash_find (news->newsgroups, line)) != NULL &&
d++;
debug_print (2, ("group: %s, desc: %s\n", line, d));
if ((data = (NNTP_DATA *) hash_find (news->newsgroups, line)) != NULL &&
hdr->content->encoding = ENC7BIT;
hdr->content->disposition = DISPINLINE;
hdr->content->length = -1;
hdr->content->encoding = ENC7BIT;
hdr->content->disposition = DISPINLINE;
hdr->content->length = -1;
nntp_get_status (ctx, hdr, NULL, hdr->article_num);
break;
case 1:
nntp_get_status (ctx, hdr, NULL, hdr->article_num);
break;
case 1:
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
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
nntp_parse_xref (ctx, nntp_data->group, b, hdr);
}
nntp_parse_xref (ctx, nntp_data->group, b, hdr);
}
#if WANT_LISTGROUP_COMMAND
if (nntp_data->nserv->hasLISTGROUP) {
snprintf (buf, sizeof (buf), "LISTGROUP %s\r\n", nntp_data->group);
#if WANT_LISTGROUP_COMMAND
if (nntp_data->nserv->hasLISTGROUP) {
snprintf (buf, sizeof (buf), "LISTGROUP %s\r\n", nntp_data->group);
if (nntp_parse_url (ctx->path, &acct, buf, sizeof (buf)) < 0 || !*buf) {
mutt_error (_("%s is an invalid newsgroup specification!"), ctx->path);
if (nntp_parse_url (ctx->path, &acct, buf, sizeof (buf)) < 0 || !*buf) {
mutt_error (_("%s is an invalid newsgroup specification!"), ctx->path);
/* 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);
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 (mutt_nntp_query (nntp_data, buf, sizeof (buf)) < 0) {
mutt_error (_("Can't post article. Connection to %s lost."),
nntp_data->nserv->conn->account.host);
if (mutt_nntp_query (nntp_data, buf, sizeof (buf)) < 0) {
mutt_error (_("Can't post article. Connection to %s lost."),
nntp_data->nserv->conn->account.host);
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;
if (nntp_data->rc || nntp_data->lastCached)
mutt_newsgroup_stat (nntp_data);
else if (nntp_data->lastMessage &&
if (nntp_data->rc || nntp_data->lastCached)
mutt_newsgroup_stat (nntp_data);
else if (nntp_data->lastMessage &&
mutt_message (msg);
nntp_get_desc (&nntp_data, "*", msg, NULL);
mutt_message (msg);
nntp_get_desc (&nntp_data, "*", msg, NULL);