-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Yet an other 1000 constant :-)

bincimapd-append.cc: 233
        while (attempt < 1000)

A way to remove the constant from the loops, could be something like this:

<CODE>
static int uniqNumber=0;
static int lastTime=0;

int getUniqNumber()
{
        if(time(NULL) == lastTime) {
                uniqNumber++;
        } else {
                uniqNumber = 0;
                lastTime = time(NULL);
        }
        return uniqNumber;
}
</CODE>

And change the loop to:

  while (true) {
    int attempt = getUniqNumber();

.. Yes this will make an infinit loop if we have >2^31 files with same pid, 
second and hostname....


And what is this sleep good for? Yet an other "we cant have flags in new/" 
problem ? :
bincimapd-append.cc: 283
        sleep(1);

It makes the server awfull slow when copying from a local folder to an imap 
folder.

- -- 
Jesper Toft
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+cH6tAbrQXS2Uy7wRAgbUAJ9j/oUBF1cNzvYA+uZuR7ZG1Ng5vQCeLj7k
+HVj0vsoiiY/jh0KnCxDIqA=
=Nuvx
-----END PGP SIGNATURE-----

Reply via email to