Sorry, my mistake.  I was baffled for a bit since it was
working in my copy.  I compared it to the 1.0.14 out there
and found the diffs.  I originally made a patch for 1.0.12.
When re-creating the patch for 1.0.13 I apparently left something out.

Please apply this patch to 1.0.14 and it should be working properly.


Thanks,

Brian

  > I just upgraded to qmailadmin 1.0.14 from 1.0.10.
  > 
  > when I log in and look at email accounts, all of the Used quotas are 0.32.
  > 
  > I'm running on Solaris 2.7 -- vpopmail 5.3.19.
  > 
  > Anyone else having this problem?  Any fixes?
  > 
  > Jim
  > 
  > 
Common subdirectories: qmailadmin-1.0.14/html and qmailadmin-1.0.14.new/html
Common subdirectories: qmailadmin-1.0.14/images and qmailadmin-1.0.14.new/images
diff -c qmailadmin-1.0.14/template.c qmailadmin-1.0.14.new/template.c
*** qmailadmin-1.0.14/template.c        Thu Mar 20 13:01:53 2003
--- qmailadmin-1.0.14.new/template.c    Mon Mar 24 00:27:11 2003
***************
*** 409,415 ****
                    get_html_text("080"));
                }
              } else {
!               long diskquota, maxmsg;
                struct vqpasswd *vpw;
                vpw = vauth_getpw(Username, Domain);
  
--- 409,416 ----
                    get_html_text("080"));
                }
              } else {
!               long diskquota = 0, maxmsg = 0;
!             char path[256];
                struct vqpasswd *vpw;
                vpw = vauth_getpw(Username, Domain);
  
***************
*** 423,429 ****
                else { sprintf(qconvert, "unlimited"); qnote = ""; }
                fprintf(actout, "<font size=\"2\" 
color=\"#000000\"><b>Quota:</b><br>%s %s %s", get_html_text("253"), qconvert, qnote);
                fprintf(actout, "<br>%s ", get_html_text("254"));
!               readuserquota(vpw->pw_dir, &diskquota, &maxmsg);
                fprintf(actout, "%-2.2lf MB</font><br>", 
((double)diskquota)/1048576.0);  /* Convert to MB */
               }
  
--- 424,431 ----
                else { sprintf(qconvert, "unlimited"); qnote = ""; }
                fprintf(actout, "<font size=\"2\" 
color=\"#000000\"><b>Quota:</b><br>%s %s %s", get_html_text("253"), qconvert, qnote);
                fprintf(actout, "<br>%s ", get_html_text("254"));
!             snprintf(path, sizeof(path), "%s/Maildir", vpw->pw_dir);
!               readuserquota(path, &diskquota, &maxmsg);
                fprintf(actout, "%-2.2lf MB</font><br>", 
((double)diskquota)/1048576.0);  /* Convert to MB */
               }
  
diff -c qmailadmin-1.0.14/user.c qmailadmin-1.0.14.new/user.c
*** qmailadmin-1.0.14/user.c    Thu Mar 20 13:01:53 2003
--- qmailadmin-1.0.14.new/user.c        Mon Mar 24 00:32:34 2003
***************
*** 137,154 ****
        colspan, get_color_text("000"), get_html_text("131"));
        moreusers = 0;
      } else {
        while ((pw != NULL) && ((k < MAXUSERSPERPAGE + startnumber) ||  
                (AdminType!=DOMAIN_ADMIN || AdminType!=DOMAIN_ADMIN || 
                (AdminType==USER_ADMIN && strcmp(pw->pw_name,Username)==0)))) {
          if (AdminType==DOMAIN_ADMIN || 
              (AdminType==USER_ADMIN && strcmp(pw->pw_name,Username)==0)) {
!           long diskquota, maxmsg;
  
            fprintf(actout, "<tr bgcolor=%s>", get_color_text("000"));
            fprintf(actout, "<td align=\"left\">%s</td>", pw->pw_name);
            fprintf(actout, "<td align=\"left\">%s</td>", pw->pw_gecos);
  
!           readuserquota(pw->pw_dir, &diskquota, &maxmsg);
            fprintf(actout, "<td align=\"right\">%-2.2lf&nbsp;/&nbsp;</td>", 
((double)diskquota)/1048576.0);  /* Convert to MB */
            if (strncmp(pw->pw_shell, "NOQUOTA", 2) != 0) {
                if(quota_to_megabytes(qconvert, pw->pw_shell)) {
--- 137,156 ----
        colspan, get_color_text("000"), get_html_text("131"));
        moreusers = 0;
      } else {
+       char path[256];
        while ((pw != NULL) && ((k < MAXUSERSPERPAGE + startnumber) ||  
                (AdminType!=DOMAIN_ADMIN || AdminType!=DOMAIN_ADMIN || 
                (AdminType==USER_ADMIN && strcmp(pw->pw_name,Username)==0)))) {
          if (AdminType==DOMAIN_ADMIN || 
              (AdminType==USER_ADMIN && strcmp(pw->pw_name,Username)==0)) {
!           long diskquota = 0, maxmsg = 0;
  
            fprintf(actout, "<tr bgcolor=%s>", get_color_text("000"));
            fprintf(actout, "<td align=\"left\">%s</td>", pw->pw_name);
            fprintf(actout, "<td align=\"left\">%s</td>", pw->pw_gecos);
  
!         snprintf(path, sizeof(path), "%s/Maildir", pw->pw_dir);
!           readuserquota(path, &diskquota, &maxmsg);
            fprintf(actout, "<td align=\"right\">%-2.2lf&nbsp;/&nbsp;</td>", 
((double)diskquota)/1048576.0);  /* Convert to MB */
            if (strncmp(pw->pw_shell, "NOQUOTA", 2) != 0) {
                if(quota_to_megabytes(qconvert, pw->pw_shell)) {

Reply via email to