Vanilla List Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fix for scores/newscores



What is the recommended way to transfer a database between servers?

I expected

	server 1: 'scores A >foo' 
	server 2: 'newscores <foo'

to be the right thing.  This didn't work since scores and newscores
expect the timeprod field of struct status to be long instead of
double.

The diffs below appear to fix the problem.  If you have an old database
you do 'convert' before 'scores A'.

There may be other differences between the current player database and
the expectations of scores and newscores.  I wouldn't know.  Use at your
own risk.

-dave

Index: scores.c
===================================================================
RCS file: /home/netrek/cvsroot/Vanilla/tools/scores.c,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 scores.c
313c313
<           status->timeprod);
---
>           (long) (status->timeprod));
Index: newscores.c
===================================================================
RCS file: /home/netrek/cvsroot/Vanilla/tools/newscores.c,v
retrieving revision 1.3
diff -r1.3 newscores.c
53a54
>     long timeprod;
65c66,67
<       &status->timeprod);
---
>       &timeprod);
>     status->timeprod = (double) timeprod;