BIG problem in windows version in function: get_uniqnum
A free Usenet server with SQL backend and RBAC.
Brought to you by:
cdpxe
Server can store only 27 messages (or 28) and after that can't. Problem is in file: database.c in function get_uniqnum. Function can't read from file after id 28.
Wrong is this:
if (!(fp=fopen(MSGID_FILE, "r+"))) {
id = 0;
fp = fopen(MSGID_FILE, "w+");
You must change this in:
if (!(fp=fopen(MSGID_FILE, "rb+"))) {
id = 0;
fp = fopen(MSGID_FILE, "wb+");
On windows that is not same!
I am make test code (in attachment). Please try that on windows, with rb+, wb+ and without "rb+, wb+. Execute program 28 times, and you will see that on windows you must change r+ w+ to rb+ and wb+.
Can you fix this BUG and make new version 1.0.5 ?
Test program
Many thanks for the report. The bug is now fixed.
Last edit: Steffen Wendzel 2015-03-28