I've added some more debugging statements to the code segment that was
specified as follows:
DEBUG(9) debug_printf("incoming quota string == %s\n", s);
d = strtod(s, &rest);
DEBUG(9) debug_printf("beginning quota value == %f\n", d);
if (tolower(*rest) == 'k') { d *= 1024.0; rest++; }
if (tolower(*rest) == 'm') { d *= 1024.0*1024.0; rest++; }
while (isspace(*rest)) rest++;
DEBUG(9) debug_printf("calculated quota value == %f\n", d);
....
ob->quota_value = (int)d;
DEBUG(9) debug_printf("returned quota value == %d\n", ob->quota_value);
return OK;
On my system (SunOS 4.1.4 running Exim 2.02), those 4 statements produce the
following:
incoming quota string == 20k
beginning quota value == 559120.000000
calculated quota value == 572538880.000000
returned quota value == 572538880
Unfortunately, my knowledge of C is far too rusty to understand why. As
always, any suggestions would be most welcome.
--
Robert C. Zilbauer, Jr. Europa Communications Inc
Primary: zilbauer@??? Secondary: zilbauer@???
"Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn."
--
*** Exim information can be found at
http://www.exim.org/ ***