This history file covers all modifications made to PRPNet Client/Server.

This is version 4.3.1.

Verison 3.2.6   May 2010 - Beta Release
    prpserver:  Added decimal length as a tie breaker when sorting by age.


Version 3.2.5:  April 2010 - Patch Release
    prpclient:  Fix loop that occurs when doing work for a Sierpinski/Riesel
                server if a prime/PRP is found.

                
Version 3.2.4:  April 2010 - Patch Release
    prpclient:  Skip workunits on Sierpinski/Riesel type servers on matching
                k/b/c with higher n if a prime/PRP is found.
                Use -gxo instead of -gx when searching for GFN divisors since
                primality test has already been done.
                This release of PRPNet requires PFGW 3.3.4 if used on any 
                projects that can test for GFN divisibility.  PFGW 3.3.4 outputs
                a string that the client requires before it can tell the server
                that it has successfully tested for GFN divisors.
    prpserver:  Added code for loading GFNs from an ABC file.  Somehow I had
                overlooked it.
                Added abcformats.txt to describe supported ABC formats.
                If unhideprimehours is set to 0, show primes immediately on
                user_primes.html page.
                Have server send out tests for lower n on Sierpinski/Riesel
                servers even if a prime/PRP is found for a higher n.
                If a Sierpinski/Riesel prime is found, then do not count
                candidates with a higher n against the "untested candidates"
                count on the server stats page.
                Fixed an issue that prevented double checks from being correctly
                updated in the database.
                Fixed e-mail message for Proth numbers to state that client
                searched for GFN divisors, but did not find any instead of saying
                that search wasn't done.
                Fixed console output issue when PRP is found.
                Fixed server_stats.html for FixedBNC servers.
                Modified columns on CandidateGroupStats to work with FixedBNC
                servers.  Use the following statements to modify the columns:
                
                alter table CandidateGroupStats modify MinInGroup varchar(20);
                alter table CandidateGroupStats modify MaxInGroup varchar(20);
                alter table CandidateGroupStats modify LeadingEdge varchar(20);


Version 3.2.3:  March 2010 - Patch Release
          all:  Fixed a crash that can occur if the socket connection is
                lost when sending data across it.
    prpserver:  Fixed SQL so that GFN divisors are inserted into the database.
                Fixed two issues that could lead to the server looping when a
                client requests work.
                Added new debug messages when fetching from a cursor.
                Change format of messages in completed_tests.log to match
                formatting from 3.2.0.
                Added sortoption=A, sorting by oldest candidate.

Version 3.2.2:  March 2010 - Patch Release
          all:  Added client socket ID to all log messages so that it is easier
                to track connection traffic.
    prpclient:  Fixed bug where base 2 tests were using PFGW instead of LLR/phrot.
    prpserver:  Use server_stats.html as the default webpage.
                Fix prime/PRP counts on server stats webpage.
                Fixed SELECT statement for FixedKBC servers when updating group stats.
                Sync group stats about three times per hour rather than whenever
                a completed test is sent, unless a prime/PRP is returned.
                Modified main work sender loop to retrieve fewer records, but to
                be re-iterated multiple times until enough work is sent or until
                there are no more records returned by the cursor.
                Added a new index to CandidateTest to be added through MySQL with
                the following command:
                
                alter table CandidateTest add index ix_residue (CandidateName, Residue);

Version 3.2.1:  February 2010 - Patch Release
          all:  Added memory leak detection logic (Windows only) and fixed
                numerous memory leaks.
                Changed sockets to include TCP_NODELAY setting.
                Fixed a number of memory leaks.
                Changed "char *fmt" to "const char *fmt" to eliminate a
                number of compiler warnings.
    prpclient:  Accept "keepalive" message from server when getting work.
                Modify so that client can connect to a server that needs
                a non-blocking or blocking socket.
    prpserver:  Fixed two crashes, one with webpage generation and one with
                unhiding primes.
                Fixed an issue with the display of Fixed K/B/C server stats.
                Send "keepalive" to client when opening work work cursor
                so that client doesn't time out.
                Fixed ordering of k on server_stats.html.
                Added all.html as the default webpage.

Version 3.2.0:  February 2010 - New Release
          all:  Fixed an issue on Linux builds with an uninitialized mutex
                causing the software to crash.
    prpclient:  Added "echotest" option to prpclient.ini.  Setting this to 0
                will tell the client not to echo "INFO" messages to the console
                for accepted tests.
                Fixed a bug when using the client to test GFNs.  When a roundoff
                error would occur, the client would neglect to delete temporary
                files generated.  The next version of genefer would run, but 
                read the same roundoff error instead of the actual test result.
                Modified client to wait up to 60 seconds to get a response from
                the server.
    prpserver:  Added "echotest" option to prpserver.ini.  Setting this to 0
                will tell the server not to echo "Test sent" and "Test received"
                messages to the console.
                Changed HTML format of Sierpinski/Riesel server_stats.html to
                create a separate table for each base along with a header and
                summary row for the base.  The summary row will now be shown in
                red if all k have a prime or PRP.
                Added UserPrimes table, which is populated upon server start
                up if the table is empty.  If the server fails to load the
                table, then it will not run until the problem is fixed.
                Added user_primes.html to show all primes found, grouped by user.
                Added unhideprimehours= to prpserver.ini.  This is used to control
                how long a prime/PRP is hidden from user_primes.html before it
                can be viewed by the public.
                Added server version to HTML title on webpages.
                Replaced "Other k/n/b/c" with "Fixed b/n/c" in prpserver.ini.  This
                changes the grouping and sorting of server stats.
                Limit size of result set on server when getting work because loading
                large numbers (100000 or more) into memory when opening the cursor
                can lead to the client timing out.
                Changes locking mechanism when getting work since MySQL does not
                seem to always respect "for update" on InnoDB database.
                Added socket to logs to aid in trouble-shooting.
                Changed LengthCalculator to select blocks of records at a time
                so that it is less likely to timeout the admin tool.

Version 3.1.5:  January 2010 - Patch Release
          all:  Changed logging so that debug.log data is written to 
                prpserver.log/prpclient.log depending upon debuglevel. This was
                done to make it easier to find debug information when enabled
                instead of having to look through multiple files.
    prpclient:  Write all results to test_results.log instead of helper program
                specific log files.
    prpserver:  Use mutex to guarantee that only one thread can update the
                database at a time when getting work.

Version 3.1.4:  January 2010 - Patch Release
          all:  Changed socket behavior to use Sleep() before select()
                because select() does not relinquish control of the CPU.
    prpclient:  Add GFN support for phrot.
                Use -e with PFGW on primality proofs to increase likelihood
                that it can get to 33% factorization, which is necessary for
                the proof.

Version 3.1.3:  January 2010 - Patch Release
    prpclient:  Fix crash with getting time of LLR test no 64-bit Linux.
                Fix bug where the client did not part LLR time correctly and
                would return 0.
     prpadmin:  Buffer 100 candidates/factors at a time instead of 1000 to
                hopefully address Linux issues with large buffers and sockets.

Version 3.1.2:  January 2010 - Patch Release
    prpserver:  Lock Candidate record to prevent two different clients from
                getting test for the same candidate at a time.
                Change database engine to InnoDB because it supports record
                level locking, which is necessary for PRPNet.  It also improves
                performance significantly.
                Flush printf() output from admin process.
     prpadmin:  Flush printf() output from server.

Version 3.1.1:  January 2010 - Patch Release
    prpserver:  Fix bug with handling factors from admin tool.

Version 3.1.0:  January 2010 - New Release
    prpserver:  Send a single INFO or ERROR message for each workunit instead of
                an acknowledgement and then immediately commit/rollback the
                transaction in the database.  This will significantly reduce the
                possibility of one happening without the other.
                The "End of WorkUnit" message must now specify the CandidateName
                and TestID for the workunit that it references.
                Add SecondsForTest to CandidateTest table.
                In theory this server is backward compatible with previous versions
                of the clients, but has not been tested. 
    prpclient:  Add CandidateName and TestID to the "End of WorkUnit" message to
                that the server matches the begin and end of the message for that
                workunit.  Without it, the server might record the test results
                against the wrong candidate.
                Instead of sending all workunits then waiting for a response,
                send them one at at time and wait for the server to send an INFO or
                ERROR message before sending the next one.
                The client now sends the number of seconds for the PRP test back
                to the server.
                In theory this client is backward compatible with previous versions
                of the server, but has not been tested.                

Version 3.0.1:  January 2010 - Patch Release
          all:  Fixed issue with large buffered messages to avoid memory leak.
     prpadmin:  Send 1000 entries at a time to the server and wait for a response
                before continuing.  This has been done to prevent the admin tool
                from flooding the server's socket, thus preventing new clients
                from connecting.
    prpserver:  Send positive confirmation to prpadmin after every 1000 entries
                has been processed so that the admin tool can continue.
                The server can now hand out candidates by n.  Check out
                sortoption= in the prpserver.ini file.
                Send greeting as part of GETWORK message.  GETGREETING is no
                longer supported.
                Changed CandidateGroupStats table column names and meanings, thus
                affecting server_stats.html.  If upgrading from 3.0.0, this table
                must be dropped and recreated and repopulated.  It can be repopulated
                through the admin tool.
                Changed servertype FixedKBNC to FixedBKC.
                Changed servertype OtherKBNC to FixedBNC.
                Close SQL cursor so successive updates are executed.  This caused
                multiple issues where database updates would not be synchronized.
    prpclient:  New logic to handle greeting from the server.
                When using PFGW, do not create ABC file, just write candidate
                to input as it will reduce the amount of output generated by PFGW.

Version 3.0.0:  January 2010 - New Release
     prpadmin:  Buffer factors and candidates from ABC files to reduce the
                number of send/receive requests on the socket.
    prpserver:  The server now runs with a MySQL database instead of the
                prpserver.candidates file.  Use the -u option to import the
                candidates and current stats into the database.
                The server is now multi-threaded.  Multiple clients can
                connect at one time to get work.

Version 2.4.7:  December 2009 - Patch Release
    prpserver:  When a client connects, turn off buffering flags in case they
                were not reset before closing previous connection.
                Add support for pending_tests.html.
                Add sortoption to prpserver.ini to affect how tests are 
                handed out and how the candidates file is saved.
                Send GFN tests to client if PFGW, LLR, or phrot are configured
                and genefer80 had a round-off error.
    prpclient:  If all genefers had a round-off error with GFN test, use PFGW,
                LLR, or phrot.

Version 2.4.6:  November 2009 - Patch Release
          all:  Use select() on the socket before receiving.  On Linux (and
                only Linux), recv() will not return if there is nothing to
                be read from the socket.  select() can be configured to
                timeout if there is nothing to be received.  On all other OSs
                (Windows, Mac OS X, HP-UX, and Solaris) recv() return a 0
                if there is nothing to be received.
                Force close of socket if nothing is received.
     prpadmin:  Change order of includes to address builds on Unix.
                Fixed an error where messages from server would not print.
    prpserver:  Modified generic server stats to not list GFN divisors found.
                Added HTML classes for GFNs, Primorials, and Factorials

Version 2.4.5:  November 2009 - Patch Release
          all:  Fixed a crash that can occur when logging is turned on.  This
                was inadvertantly added in 2.4.4
                Modified handling of large messages since some OSs return the
                buffer size and some return the number of bytes read when
                receiving messages on a socket.
                Reduced socket timeout to 10 seconds.

Version 2.4.4:  November 2009 - Patch Release
          all:  Fixed a crash that occurs when large messages (> 1000 bytes)
                are received.
    prpserver:  Prevent server from double-checking primes.
                Output a message if unable to open one of the .removed files
                and keep candidate in the main file until the .removed file
                can be opened.  This addresses a potential crash in which the
                server presumed that the .removed could be opened. 

Version 2.4.3:  October 2009 - Official Patch Release
    prpclient:  Fixed a logging issue with the client to address potential
                segfaults.
                Fixed issue when loading workunits for GFN projects.
                Fixed issue with GFN testing that prevented client from choosing
                the correct executable for PRP tests.

Version 2.4.2:  October 2009 - Un-official Patch Release
          all:  Fixed a buffering issue with large messages.  This would normally
                affect prpadmin and prpserver, but could affect prpclient as well.
                Print error when unable to write to log.
    prpclient:  Output server version after getting work from the server.
                Fix issues with genefX64 that do not occur with genefer or genefer80.
                Fixed issue with validating helper programs.
                Fixed an issue where debuglevel=1 wouldn't log socket messages.
    prpserver:  Fixed a bug that causes the server to crash when it tries to
                add second tests for a candidate.
                Fixed a bug that causes the server to crash when configured for a
                Generalized Fermat Search.

Version 2.4.1:  October 2009 - Un-official Patch Release
    prpclient:  Fix issues with identifying versions of genefer that the client
                can run.
    prpserver:  Add an extra carriage return so HTML is correctly generated in
                browsers.
    
Version 2.4.0:  September 2009 - New Release
    prpserver:  When a client has established a new connection, send a
                message so that the client does not send any additional
                data until it receives that confirmation.
                Return immediately if the test is not found.  This addresses
                an issue where the server would log tests without residues.
                Send all responses for returned workunits in a single buffer
                to the client.  This eliminates synchronization issues
                between the client and server.
                Send "Acknowledge" message for each returned workunit.
                If the server loses its connection to the client in the
                middle of processing, it will terminate the connection
                immediately.  This should eliminate the appearance of the
                server "hanging" when that happens.
                Add additional debug information when expiring tests.
                Added support to search for Generalized Fermat Numbers (GFNs).
                Removed server_status.html.
    prpclient:  The client will wait for the server to tell that it has
                a connection before returning work.
                Send all returned workunits in a single buffer to the server
                and then wait for the server to return its messages.  This
                eliminates synchronization issues between the client and server.
                Look for "Acknowledge" message from server for each workunit
                before deleting the workunit.
                Tell server that the client has disconnected rather then using
                the generic "QUIT" message.
                This version no longer passes the -e argument to phrot.  It
                presumes that users have upgraded to phrot 0.71.
                Added support for GFN servers (and genefer software).

Version 2.3.0:  August 2009 - New Release
    prpserver:  Display count of primes by user on user_stats.html on pages
                where it was missing.
                Fixed an issue with Twin Prime servertype where it did not
                support certain ABC file formats.
    prpclient:  If PFGW fails with -a2, terminate the client.
                Pass idle flag to PFGW.  If idle=0, then the client will pass
                -N to PFGW, making run in normal priority.
                Delete the temp output file from PFGW so that when re-run
                with -a1 or -a2 that it doesn't find it and get caught in a loop.
                Fixed an issue with Twim Prime searches as client would
                always do -1 test even when +1 test was composite.
                Removed frequency= option.  The client will now complete all
                workunits before reporting to the server.

Version 2.2.6:  August 2009 - Patch Release
    prpclient:  Fixed an issue that causes the client to hang when the
                server does not respond when the client is returning
                work to the server.

Version 2.2.5:  August 2009 - Patch Release
    prpclient:  Fixed two issues where the client was accessing memory
                not available to it.  These would be triggered when
                the server rejects the test result or when the server
                no longer no longer has a record of the test.

Version 2.2.4:  August 2009 - Patch Release
          all:  Set timeout setting for reading from the socket to 30 
                seconds instead of 10 seconds.
    prpserver:  Corrected server_status.html page to show "Min N" in the
                appropriate column.
                Reject tests from the client if a residue is not provided.
                Added a required htmltitle= in the prpserver.ini file so that
                the server can provide a title for the generated HTML.
                Tell the browser to close the connection after the client
                closes the connection.  This addresses the browser "stalling"
                when someone requests one of the web pages.
    prpclient:  If the server does not respond before the timeout when returning
                workunits, the client will stop trying to send additional
                workunits so that it can remain in sync with the server.

Version 2.2.3:  June 2009 - Patch Release
    prpserver:  Add client ID to log files.
                Remove support for 1.x clients.
    prpclient:  Pass correct flag to PFGW for Primorial/Factorial primality tests.
                Set residue to PRIME when PFGW does primality test and number is prime.
                Delete save file if there are no work units.
                Use PFGW for non-base 2 numbers as v3.1 is faster than LLR and phrot.

Versino 2.2.2:  June 2009 - Patch Release
    prpclient:  Fixed issue with restarting client where it would not handle some
                start options correctly.
                Modified log messages on the client when the server refuses the
                workunit.  In these cases the client will drop the workunit so that
                it can continue doing other work for the server.

Version 2.2.1:  June 2009 - Patch Release
    prpserver:  More changes to prpserver.delay to remove first test checks.  The
                server will no longer send the same test to two clients unless one
                of the client's has missed the expiration deadline.
    prpclient:  Fix a segfault if communication with the server is broken while
                sending workunits back.
                Fixed issue with counting of completed and current work units.
                The client will drop tests that are not known on the server.

Version 2.2.0:  June 2009 - New Release
    prpserver:  Add ability to expire tests (see prpserver.delay for information).
                Check for pending tests before removing candidates from the server.
                Add support for Twin Prime searches.
                Remove candidates after a successful test if there is no double-ckecking.
    prpclient:  Check for existence of workunit on server before sending rest of message.
                Add support for Twin Prime searches.
                Modularized code for the handling of helper programs.
                Do not return immediately when a prime/prp is found so that no tests
                are abandoned.
                Use -k feature added in PFGW 1.3.

Version 2.1.5:  May 2009 - Patch Release
    prpserver:  Do not give credit for abandoned tests.
                Use prpnet.ico for favicon.ico instead of prpnet.gif as some browsers
                do not support gifs.

Version 2.1.4:  May 2009 - Patch Release
    prpserver:  Return "End of Message" semaphore when the client has returns results
                that do not correspond to any tests on the server.

Version 2.1.3:  May 2009 - Patch Release
    prpclient:  Add startoption and stopoption for use with automated clients.  Read
                the prpclient.ini file for more information
    prpserver:  Close the user_stats.ini file after saving.
                Fixed issue with user_stats.ini where score was not calculated
                correctly after a prime was found.
                Add prpnet.gif in response to favicon.ico request from browser.
                Various enhancements to user stats.

Version 2.1.2:  May 2009 - Official Release
    prpclient:  Fixed patch that addressed PFGW FFT rounding error as it completely
                borked the 2.1.1 client. 
                More changes for ^C handling to get Windows to work as I would expect
                it to work (which should be more like Unix).

Version 2.1.1:  May 2009 - Patch Release (beta)
    prpclient:  Fixed patch that addressed PFGW FFT rounding error as it completely
                borked the 2.1.0 client.
                Modified to skip lines in lresults.txt that are not related to
                the results of the test.

Version 2.1.0:  May 2009 - New Release (alpha)
    prpclient:  Modify handling of ^C with Visual Studio build used by Windows.
                After returning work, continue to read from socket until getting
                "End of Message" semaphore.
                Delete all temp files after returning results to the server.
                Capture FFT rounding errors from PFGW and re-issue test using -a option.
                Write servertype to save file so that workunits can be correctly handled
                upon restart of the client.
                When restarting the client, ask user what to do with workunits that have 
                been saved.
    prpserver:  Add user element to completed_tests.log.
                Look for correct return codes when sending e-mail using SMTP authentication.
                Replace %T format when calling strftime as Windows doesn't support it
                and will terminate application when it find it.
                Changed user stats structure hoping to eliminate stats collection issue.
                Send "End of Message" to client after receiving work done as a semaphore
                to the client to stop reading from the socket.
                Add Primes Found and GFN Divisors found to Fixed k/b/c server user stats HTML.

Version 2.0.4:  April 2009 - Official Release
    prpclient:  Change options for PFGW when finding GFNs to not do an unnecessary PRP test.
    
Version 2.0.3:  April 2009 - Patch Release (beta)
    prpclient:  Fix an issue where the client does not parse LLR test results correctly

Version 2.0.2:  April 2009 - Patch Release (beta)
    prpserver:  Log GFNs returned by the client
                Fix HTML generation as it would not respond in a timely fashion to the browser.
                Fix double close when loading from an ABC file.

Version 2.0.1:  April 2009 - Patch Release (beta)
          all:  Address issues with uninitialized variables when using Visual Studio.

Version 2.0.0:  April 2009 - New Release (alpha)
          all:  Add userid support which can be different than emailid.
                emailid is still required for uniqueness.
    prpadmin:   This gives an administrator access to the server to add new candidates (via 
                an ABC file) or remove candidates (via a factor log file) if factors have
                been found.
    prpserver:  Ingore SIGPIPE signal until I understand how to prevent that signal from being
                throw when I don't want it to be thrown.
                Verify that there are no duplicate candidate names after loading is complete,
                not during the loading process as it takes a very long time to load the
                server if there are a large number of candidates.
                Added a new stats engine.  This allows a web browser to call the server directly
                to get supported web pages.  More info can be found in readme.txt.
                Support SMTP verification and authentication for any mail the server sends.
                Added support for primorial and factorial server types.
                Removed master/slave logic as it isn't useful.
                Added support for prpadmin.
    prpclient:  Added "affinity=" option so that the client can tell LLR which CPU to use.
                When the client is terminated with a ^C, prompt the user as to what they want
                to do with workunits.
                Modified the client to use LLR for bases above 50 if it can choose between LLR
                and phrot.
                Fixed an issue where client performs tests again if not able to communicate with
                server.
                Added support for PFGW.  This means that the client can perform generic PRP and
                primality tests (whatever PFGW and prpserver can support).
                If PFGW is configured, that the client can do its own primality test if the
                first test was only a PRP test.
                If PFGW is configured, use it to test Proth primes for GFN divisibility.

Version 1.0.5:  January 2009 - Patch Release
          all:  Fixed an issue on Windows as Visual Studio does not initialize
                instance variables if they are not explicity initialized.
    prpclient:  Fixed an issue when loading from a save file where the number 
                of completed work units was not correctly updated.

Version 1.0.4:  January 2009 - Patch Release
          all:  Increase size of buffer for candidate names as 20 characters
                was not long enough.
    prpclient:  If there is only one workunit and it is inprogress, then do
                not communicate with the server.
                Write LLR primes to llr.prime and PRPs to llr.prp.
    prpserver:  Fixed a bug introduced with the Windows build that causes
                the server to not calculate the decimal length correctly.

Version 1.0.3:  January 2009 - Patch Release
          all:  Create .sln and .vcproj files for Microsoft Visual Studio.
                Modified Socket logic and defs.h to work with MS Visual Studio.
    prpclient:  Explicitly intialize some variables so that the Visual Studio
                build does not complain about them.
                Reset number of completed work units after getting new work.
                Put the erroneous client ID in the message that indicates that the
                client ID is invalid (instead of the e-mail ID).
    prpserver:  Send an INFO message instead of ERROR if the server does not find
                the candidate by name.  This will cause the results of the test to
                be lost, but will allow the client to continue processing other
                work units.  This behavior might be changed in the future.

Version 1.0.2:  January 2009 - Patch Release
    prpclient:  Send abandoned tests to the server so that the server knows when
                the client is not going to perform the test and can thus send a
                test to someone else.
                Fix an memory leak when maxworkunits is decreased to a value lower
                than the number of saved tests in the work*.save file.
                Allow setting of maxworkunits of 0 to complete any current incomplete
                test, send it to the server, then terminate the client.
                The next version of phrot can do a primality test for Proth numbers,
                so ensure that it is captured correctly and reported to the server.
    prpserver:  Fix an issue in Candidate.cpp where the number of successful tests
                performed was not incremented.
                When a successful test is returned, log the test in a file called
                completed_tests.log.
                The client can now indicated if a test has been abandoned.  If it
                has, then don't update the timestamp, but delete the test so that
                someone else can perform it.

Version 1.0.1:  December 2008 - Patch Release
    prpclient:  LLR output for base 2 tests differs from other bases, thus it has
                to be parsed differently.
                LLR for Proth numbers (k*2^n+1) performs a primality test, thus
                check for primality and report the number as prime instead of
                as a PRP.
    prpserver:  Check for numbers marked as Prime by LLR.

Version 1.0.0:  December 2008 - Initial Release

