Mercurial > hg > mlmmj
changeset 591:29728cd732e7
Fixed EOF handling in checkwait_smtpreply()
author | mortenp |
---|---|
date | Tue, 19 Sep 2006 06:22:10 +1000 |
parents | be0aadade2e1 |
children | 2ca913c3541b |
files | ChangeLog src/checkwait_smtpreply.c |
diffstat | 2 files changed, 4 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Sep 19 05:22:24 2006 +1000 +++ b/ChangeLog Tue Sep 19 06:22:10 2006 +1000 @@ -1,3 +1,4 @@ + o Fixed EOF handling in checkwait_smtpreply() o Fixed header unfolding in gethdrline() 1.2.12-RC2 o Changed German listtexts (Stefan Reinauer, Christian Lackas)
--- a/src/checkwait_smtpreply.c Tue Sep 19 05:22:24 2006 +1000 +++ b/src/checkwait_smtpreply.c Tue Sep 19 06:22:10 2006 +1000 @@ -28,24 +28,14 @@ #include "checkwait_smtpreply.h" #include "config.h" #include "memory.h" +#include "mygetline.h" -#define USEC_WAIT 1 -#define LOOP_WAIT 10000 - -#define RFC_REPLY_SIZE 512 char *checkwait_smtpreply(int sockfd, int replytype) { - size_t len = 0; - char smtpreply[RFC_REPLY_SIZE + 1]; - - smtpreply[RFC_REPLY_SIZE] = '\0'; + char *smtpreply; - do { - len += read(sockfd, (smtpreply+len), RFC_REPLY_SIZE - len); - } while(smtpreply[len - 1] != '\n' && len <= RFC_REPLY_SIZE); - - smtpreply[len] = '\0'; + smtpreply = mygetline(sockfd); #if 0 printf("replytype = [%d], smtpreply = [%s]\n", replytype, smtpreply); fprintf(stderr, "%s", smtpreply);