Commit dbcd5431 dbcd54314406ce43aaa236de31f618858879c129 by Alain Magloire

mailutils/nntp.h mailutils/sys/nntp.h

adjustement to the headers.
1 parent beee5d8f
......@@ -45,16 +45,16 @@ extern int mu_nntp_set_debug (mu_nntp_t nntp, mu_debug_t debug);
extern int mu_nntp_stls (mu_nntp_t nntp);
extern int mu_nntp_article (mu_nntp_t nntp, long num, stream_t *stream);
extern int mu_nntp_article_id (mu_nntp_t nntp, const char *id, stream_t *stream);
extern int mu_nntp_article (mu_nntp_t nntp, unsigned long num, unsigned long *pnum, char **mid, stream_t *stream);
extern int mu_nntp_article_id (mu_nntp_t nntp, const char *id, unsigned long *pnum, char **mid, stream_t *stream);
extern int mu_nntp_header (mu_nntp_t nntp, long num, stream_t *stream);
extern int mu_nntp_header_id (mu_nntp_t nntp, const char *name, stream_t *stream);
extern int mu_nntp_head (mu_nntp_t nntp, unsigned long num, unsigned long *pnum, char **mid, stream_t *stream);
extern int mu_nntp_head_id (mu_nntp_t nntp, const char *name, unsigned long *pnum, char **mid, stream_t *stream);
extern int mu_nntp_body (mu_nntp_t nntp, long num, stream_t *stream);
extern int mu_nntp_body_id (mu_nntp_t nntp, const char *name, stream_t *stream);
extern int mu_nntp_body (mu_nntp_t nntp, unsigned long num, unsigned long *pnum, char **mid, stream_t *stream);
extern int mu_nntp_body_id (mu_nntp_t nntp, const char *name, unsigned long *pnum, char **mid, stream_t *stream);
extern int mu_nntp_stat (mu_nntp_t nntp, long num, char **id);
extern int mu_nntp_stat (mu_nntp_t nntp, unsigned long num, char **id);
extern int mu_nntp_stat_id (mu_nntp_t nntp, const char *name, char **id);
extern int mu_nntp_group (mu_nntp_t nntp, const char *group, long *total, long *first, long *last, char **name);
......
......@@ -35,7 +35,7 @@ enum mu_nntp_state
MU_NNTP_NO_STATE,
MU_NNTP_CONNECT, MU_NNTP_GREETINGS,
MU_NNTP_ARTICLE, MU_NNTP_ARTICLE_ACK, MU_NNTP_ARTICLE_RX,
MU_NNTP_HEADER, MU_NNTP_HEADER_ACK, MU_NNTP_HEADER_RX,
MU_NNTP_HEAD, MU_NNTP_HEAD_ACK, MU_NNTP_HEAD_RX,
MU_NNTP_BODY, MU_NNTP_BODY_ACK, MU_NNTP_BODY_RX,
MU_NNTP_STAT, MU_NNTP_STAT_ACK,
MU_NNTP_STLS, MU_NNTP_STLS_ACK, MU_NNTP_STLS_CONNECT,
......@@ -120,10 +120,10 @@ while (0)
/* Check if we got "2xx". In NNTP protocol and ack of "2xx" means the command was successfull.
*/
#define MU_NNTP_CHECK_COMPLETE(nntp) \
#define MU_NNTP_CHECK_OK(nntp) \
do \
{ \
if (nntp->ack.buf[0] == '2') != 0) \
if (nntp->ack.buf[0] != '2') \
{ \
nntp->state = MU_NNTP_NO_STATE; \
return EACCES; \
......