I sent this to the vchkpw list first, not really thinking that there was a
qmailadmin list.

Rick

----- Forwarded message from [EMAIL PROTECTED] -----
    Date: Mon,  3 Mar 2003 18:26:43 -0600
    From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Reply-To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
 Subject: Re: [vchkpw] Quotas - Got it.  Patch attached
      To: Rick Romero <[EMAIL PROTECTED]>

Quoting Rick Romero <[EMAIL PROTECTED]>:

> On Mon, 2003-03-03 at 09:52, Rick Romero wrote:
> > I wanted to mention that when using qmailadmin-1.12 and vpopmail-5.3.18,
> > if I set the quota from qmailadmin to 100MB, the quota is set to
> > 100483292.00  (I'm just guessing on the bytes, but you get the idea).
> >
> > For some reason, I belive the .00 makes vdelivermail bounce email saying
> > the user is over quota.  Using vsetuserquota to set the actual # of
> > bytes works fine though.
> 

Minor typo in util.c:

--- qmailadmin-1.0.12/util.c    Fri Jan 24 16:25:31 2003
+++ qmailadmin-1.0.12-vfe/util.c        Mon Mar  3 18:25:11 2003
@@ -272,7 +272,7 @@
     if (quota == NULL) { return 1; }
     if (tmp = atol(quota)) { tmp *= 1048576; }
     else { return 1; }
-    sprintf(returnval, "%-2.2lf", tmp);
+    sprintf(returnval, "%-2.0f", tmp);
     return 0;
 }
 int quota_to_megabytes(char returnval[], char *quota) {


I also made it just a float, instead of a long float..  Maybe I'm wrong, but it
works for me...

Rick

----- End forwarded message -----




Reply via email to