<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40308 >

The current capability sets are not enough for GGZ.

Specifically, GGZ does its own capability checking (or prechecking), 
comparing capability strings to see if a game is "supported".  Each GGZ 
room supports one game so there is a 2.1 room which should support the 
whole 2.1 collection (the bizarre broken capability in 2.1 notwithstanding).

This string is provided in several places: data/civclient.dsc.in, 
data/civserver.dsc.in, and is used in ggz_gtk_init in gui_main.c.

But with our optional capabilities the regular capstring cannot be used 
here.  Doing so means GGZ sees compatible releases as incompatible if 
they contain different optional capabilities.  When NETWORK_CAPSTRING 
was first added to the bootstrap (AC_SUBST and AC_DEFINE) it was to 
allow ggz support but I completely missed this nuance.

The easiest way I think is to separate the capstring into two strings, 
one for mandatory and one for optional capabilities.  The attached patch 
does this; it's pretty simple really.

For 2.1 to get GGZ support working again (since an optional capability 
was present there) a similar change (probably more complicated since the 
2.1 system is different) will be needed for that branch along with a new 
2.1 release.


Index: version.in
--- version.in	(revision 14848)
+++ version.in	(working copy)
@@ -23,4 +23,5 @@
 #   - Avoid adding a new mandatory capability to the development branch for
 #     as long as possible.  We want to maintain network compatibility with
 #     the stable branch for as long as possible.
Index: configure.ac
--- configure.ac	(revision 14848)
+++ configure.ac	(working copy)
@@ -44,9 +44,14 @@
 		   [Network capability string])
+		   [Additional optional network capabilities])
 dnl Initialize automake stuff
Index: data/civserver.dsc.in
--- data/civserver.dsc.in	(revision 14848)
+++ data/civserver.dsc.in	(working copy)
@@ -12,7 +12,7 @@
 Engine = Freeciv
 AllowLeave = 1
Index: data/civclient.dsc.in
--- data/civclient.dsc.in	(revision 14848)
+++ data/civclient.dsc.in	(working copy)
@@ -7,5 +7,5 @@
 Homepage = http://www.freeciv.org/
 Name = Freeciv
 ProtocolEngine = Freeciv
-ProtocolVersion = @NETWORK_CAPSTRING@
 Version = @VERSION@
Index: common/capstr.h
--- common/capstr.h	(revision 14848)
+++ common/capstr.h	(working copy)
@@ -13,6 +13,9 @@
 #ifndef FC__CAPSTR_H
 #define FC__CAPSTR_H
 extern const char * const our_capability;
 void init_our_capability(void);
Index: client/gui-gtk-2.0/gui_main.c
--- client/gui-gtk-2.0/gui_main.c	(revision 14848)
+++ client/gui-gtk-2.0/gui_main.c	(working copy)
@@ -1412,7 +1412,7 @@
    * civserver.dsc.in. */
 		     ggz_connected, ggz_game_launched, ggz_closed,
-		     "Freeciv", NETWORK_CAPSTRING, "Pubserver");
+		     "Freeciv", NETWORK_CAPSTRING_MANDATORY, "Pubserver");
Freeciv-dev mailing list

Reply via email to