exit(0);
}
close(mypipe[1]);
- atf_utils_readline(mypipe[0]);
+ mygetline(mypipe[0]);
int sock;
do {
init_sockfd(&sock, "127.0.0.1", 25678);
if (p == 0) {
dprintf(smtppipe[0], "220 me fake smtp\n");
/* EHLO */
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
dprintf(smtppipe[0],
"250-hostname.net\n"
"250-PIPELINEING\n"
"250-SMTPUTF8\n"
"250 CHUNKING\n");
/* HELO */
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
dprintf(smtppipe[0],
"250-hostname.net\n");
/* MAIL FROM */
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
dprintf(smtppipe[0],
"250 2.1.0 Ok\n");
/* RCPT TO */
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
dprintf(smtppipe[0],
"250 2.1.0 Ok\n");
/* DATA */
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
dprintf(smtppipe[0],
"354 Send message content; end with <CRLF>.<CRLF>\n");
/* DATA */
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
dprintf(smtppipe[0],
"250 2.1.0 Ok\n");
/* QUIT */
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
dprintf(smtppipe[0],
"221 2.0.0 Bye\n");
/* RSET */
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
dprintf(smtppipe[0],
"250 2.0.0 Ok\n");
exit (0);
if (c == -1)
err(5, "accept()");
dprintf(c, "220 me fake smtp\n");
- reply = atf_utils_readline(c);
+ reply = mygetline(c);
printf("%s", reply);
dprintf(c,
"250-hostname.net\n"
"250-DSN\n"
"250-SMTPUTF8\n"
"250 CHUNKING\n");
- reply = atf_utils_readline(c);
+ reply = mygetline(c);
printf("%s", reply);
dprintf(c, "221 2.0.0 bye\n");
exit(0);
}
close(smtppipe[1]);
- atf_utils_readline(smtppipe[0]);
+ mygetline(smtppipe[0]);
int sockfd;
int ret = initsmtp(&sockfd, "127.0.0.1", 25678, "heloname");
ATF_REQUIRE_EQ(ret, 0);
exit(0);
}
close(smtppipe[1]);
- atf_utils_readline(smtppipe[0]);
+ mygetline(smtppipe[0]);
int sockfd;
int ret = initsmtp(&sockfd, "127.0.0.1", 25678, "heloname");
ATF_REQUIRE_EQ(ret, MLMMJ_CONNECT);
if (c == -1)
err(5, "accept()");
dprintf(c, "220 me fake smtp\n");
- reply = atf_utils_readline(c);
+ reply = mygetline(c);
printf("%s", reply);
dprintf(c, "501 nop nope\n");
exit(0);
}
close(smtppipe[1]);
- atf_utils_readline(smtppipe[0]);
+ mygetline(smtppipe[0]);
int sockfd;
int ret = initsmtp(&sockfd, "127.0.0.1", 25678, "heloname");
ATF_REQUIRE_EQ(ret, MLMMJ_EHLO);
if (c == -1)
err(5, "accept()");
dprintf(c, "220 me fake smtp\n");
- reply = atf_utils_readline(c);
+ reply = mygetline(c);
printf("%s", reply);
dprintf(c, "801 meh\n");
- reply = atf_utils_readline(c);
+ reply = mygetline(c);
printf("%s", reply);
close(c);
c = accept(s, (struct sockaddr *) &cl, &clsize);
if (c == -1)
err(5, "accept()");
dprintf(c, "220 me fake smtp\n");
- reply = atf_utils_readline(c);
+ reply = mygetline(c);
printf("%s", reply);
dprintf(c, "250 OK\n");
exit(0);
}
close(smtppipe[1]);
- atf_utils_readline(smtppipe[0]);
+ mygetline(smtppipe[0]);
int sockfd;
int ret = initsmtp(&sockfd, "127.0.0.1", 25678, "heloname");
ATF_REQUIRE_EQ(ret, 0);
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_STREAM, 0, smtppipe) >= 0);
pid_t p = atf_utils_fork();
if (p == 0) {
- char *reply = atf_utils_readline(smtppipe[0]);
+ char *reply = mygetline(smtppipe[0]);
printf("%s", reply);
/* nope */
dprintf(smtppipe[0], "550 2.1.0 kO\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
exit(0);
}
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_STREAM, 0, smtppipe) >= 0);
pid_t p = atf_utils_fork();
if (p == 0) {
- char *reply = atf_utils_readline(smtppipe[0]);
+ char *reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 Ok\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "550 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
exit(0);
}
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_STREAM, 0, smtppipe) >= 0);
pid_t p = atf_utils_fork();
if (p == 0) {
- char *reply = atf_utils_readline(smtppipe[0]);
+ char *reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 Ok\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "550 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
exit(0);
}
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_STREAM, 0, smtppipe) >= 0);
pid_t p = atf_utils_fork();
if (p == 0) {
- char *reply = atf_utils_readline(smtppipe[0]);
+ char *reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 Ok\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "550 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
exit(0);
}
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_STREAM, 0, smtppipe) >= 0);
pid_t p = atf_utils_fork();
if (p == 0) {
- char *reply = atf_utils_readline(smtppipe[0]);
+ char *reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 Ok\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
exit(0);
}
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_STREAM, 0, smtppipe) >= 0);
pid_t p = atf_utils_fork();
if (p == 0) {
- char *reply = atf_utils_readline(smtppipe[0]);
+ char *reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 Ok\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "350 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "350 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
exit(0);
}
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_STREAM, 0, smtppipe) >= 0);
pid_t p = atf_utils_fork();
if (p == 0) {
- char *reply = atf_utils_readline(smtppipe[0]);
+ char *reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 Ok\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "350 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 OK\n");
exit(0);
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_STREAM, 0, smtppipe) >= 0);
pid_t p = atf_utils_fork();
if (p == 0) {
- char *reply = atf_utils_readline(smtppipe[0]);
+ char *reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 Ok\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "350 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 OK\n");
exit(0);
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_STREAM, 0, smtppipe) >= 0);
pid_t p = atf_utils_fork();
if (p == 0) {
- char *reply = atf_utils_readline(smtppipe[0]);
+ char *reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 Ok\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "350 2.1.0 OK\n");
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
- reply = atf_utils_readline(smtppipe[0]);
+ reply = mygetline(smtppipe[0]);
printf("%s", reply);
dprintf(smtppipe[0], "250 2.1.0 OK\n");
exit(0);