]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Fixed EOF handling in checkwait_smtpreply()
authormortenp <none@none>
Mon, 18 Sep 2006 20:22:10 +0000 (06:22 +1000)
committermortenp <none@none>
Mon, 18 Sep 2006 20:22:10 +0000 (06:22 +1000)
ChangeLog
src/checkwait_smtpreply.c

index 912881f7a0498d3be889cc722b3418e7420d3200..3c020b8e0432e5d6e13010a49b5cf0ff7252e9d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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)
index 41b110b5f835995f89fb66ab9811049fcae951af..8c7cfc71f645a1a6543b10010589feead1812938 100644 (file)
 #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';
-
-       do {
-               len += read(sockfd, (smtpreply+len), RFC_REPLY_SIZE - len);
-       } while(smtpreply[len - 1] != '\n' && len <= RFC_REPLY_SIZE);
+       char *smtpreply;
 
-       smtpreply[len] = '\0';
+       smtpreply = mygetline(sockfd);
 #if 0
        printf("replytype = [%d], smtpreply = [%s]\n", replytype, smtpreply);
        fprintf(stderr, "%s", smtpreply);