X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fdropsbr.c;h=e1058842669efc37c7928b5d0459d8c7f0cb5712;hp=124e5ab55432347e03e640201677f9bcf62fc8b8;hb=6e9577f324bef90765a5edc02044eb111ec48072;hpb=768b5edd9623b7238e12ec8dfc409b82a1ed9e2d diff --git a/uip/dropsbr.c b/uip/dropsbr.c index 124e5ab..e105884 100644 --- a/uip/dropsbr.c +++ b/uip/dropsbr.c @@ -6,14 +6,15 @@ ** complete copyright information. */ -#include -#include - #include +#include #include #include #include #include +#include +#include +#include /* @@ -43,8 +44,8 @@ mbox_open(char *file, uid_t uid, gid_t gid, mode_t mode) #endif case ETXTBSY: i = errno; - sleep(5); - break; + sleep(1); + continue; default: /* just return error */ @@ -130,7 +131,7 @@ mbox_copy(int to, int from) fp = strchr(ep + 1, '\n'); tp = dctime(dlocaltimenow()); snprintf(buffer, sizeof(buffer), - "From %.*s %s", + "From %.*s %s", (int)(fp-ep), ep, tp); } else if (strncmp(buffer, "X-Envelope-From:", 16)==0) { @@ -157,7 +158,7 @@ mbox_copy(int to, int from) ep = "nobody@nowhere"; tp = dctime(dlocaltimenow()); snprintf(buffer, sizeof(buffer), - "From %s %s%s", ep, tp, + "From %s %s%s", ep, tp, tmpbuffer); } } @@ -169,7 +170,7 @@ mbox_copy(int to, int from) if (i != 0 && strncmp(buffer, "From ", 5) == 0) { write(to, ">", 1); } - if (write(to, buffer, strlen(buffer)) != strlen(buffer)) { + if (write(to, buffer, strlen(buffer)) != (int)strlen(buffer)) { fclose(fp); return NOTOK; }