Please find bellow a patch which check EOF condition instead of no
input. Without fix for this bug package is virtually not useable (I
experienced mysterious attachment cuts, so I can not relay on it at it's
present form :-( Please consider importance of this bug as "serious" at
the very least.

--- ssmtp.c.R   2005-08-25 19:41:15.000000000 +0300
+++ ssmtp.c     2005-08-25 19:45:11.000000000 +0300
@@ -1532,7 +1532,13 @@
          stdio functions like fgets in the first place */
        fcntl(STDIN_FILENO,F_SETFL,O_NONBLOCK);

-       while(fgets(buf, sizeof(buf), stdin)) {
+       while(!feof(stdin)) {
+               if (!fgets(buf, sizeof(buf), stdin)) {
+                       /* if nothing was received, then no transmission
+                        * over smtp should be done */
+                       sleep(1);
+                       continue;
+               }
                /* Trim off \n, double leading .'s */
                standardise(buf);

--------------------- 8< --------------------------------



-- 
Aidas Kasparas
IT administrator
GM Consult Group, UAB


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to