mirror of https://framagit.org/bortzmeyer/echoping
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
497 B
C
39 lines
497 B
C
24 years ago
|
/* Code contributed by Samuel Tardieu <sam@inf.enst.fr>
|
||
|
*
|
||
|
* $Id$
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#include "echoping.h"
|
||
|
|
||
|
#ifdef SMTP
|
||
|
|
||
|
char big_recvline[MAXTOREAD];
|
||
|
|
||
|
int
|
||
|
smtp_read_response_from_server (FILE *fs)
|
||
|
{
|
||
|
int nr;
|
||
|
int i;
|
||
|
|
||
|
for (i = 0; i < MAXSMTPLINES; i++)
|
||
|
{
|
||
|
nr = readline (fs, big_recvline, MAXTOREAD, TRUE);
|
||
|
if (nr <= 4)
|
||
|
{
|
||
|
return -1;
|
||
|
}
|
||
|
if (big_recvline[3] == ' ')
|
||
|
{
|
||
|
return nr;
|
||
|
}
|
||
|
if (big_recvline[3] != '-')
|
||
|
{
|
||
|
return -1;
|
||
|
}
|
||
|
}
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
#endif /* SMTP */
|