static int nntpdriver_append_message(mailsession * session, const char * message, size_t size) { int r; do { r = newsnntp_post(get_nntp_session(session), message, size); switch (r) { case NEWSNNTP_ERROR_REQUEST_AUTHORIZATION_USERNAME: r = nntpdriver_authenticate_user(session); if (r != MAIL_NO_ERROR) return r; break; case NEWSNNTP_WARNING_REQUEST_AUTHORIZATION_PASSWORD: r = nntpdriver_authenticate_password(session); if (r != MAIL_NO_ERROR) return r; break; default: return nntpdriver_nntp_error_to_mail_error(r); } } while (1); }
static void post_run(struct etpan_thread_op * op) { struct post_param * param; struct post_result * result; int r; param = op->param; result = op->result; CHECK_NNTP(); r = newsnntp_post(param->nntp, param->contents, param->len); result->error = r; debug_print("nntp post run - end %i\n", r); }