Author: cazfi
Date: Fri Mar 27 21:02:11 2015
New Revision: 28639

URL: http://svn.gna.org/viewcvs/freeciv?rev=28639&view=rev
Log:
Start server on port 6556 by default when using json protocol.

See patch #5949

Modified:
    trunk/client/clinet.c
    trunk/configure.ac
    trunk/server/srv_main.c

Modified: trunk/client/clinet.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/clinet.c?rev=28639&r1=28638&r2=28639&view=diff
==============================================================================
--- trunk/client/clinet.c       (original)
+++ trunk/client/clinet.c       Fri Mar 27 21:02:11 2015
@@ -150,7 +150,11 @@
                               char *errbuf, int errbufsize)
 {
   if (port == 0) {
+#ifdef FREECIV_JSON_CONNECTION
+    port = FREECIV_JSON_PORT;
+#else  /* FREECIV_JSON_CONNECTION */
     port = DEFAULT_SOCK_PORT;
+#endif /* FREECIV_JSON_CONNECTION */
   }
 
   /* use name to find TCP/IP address of server */

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=28639&r1=28638&r2=28639&view=diff
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Fri Mar 27 21:02:11 2015
@@ -22,7 +22,8 @@
 AC_DEFINE([FREECIV_META_URL], ["http://meta.freeciv.org/metaserver.php";], 
[Metaserver URL])
 AC_DEFINE_UNQUOTED([WIKI_URL], ["$WIKI_URL"], [Informational URL])
 
-AC_DEFINE(DEFAULT_SOCK_PORT, 5556, [Connection TCP Port])
+AC_DEFINE([DEFAULT_SOCK_PORT], [5556], [Connection TCP Port])
+AC_DEFINE([FREECIV_JSON_PORT], [6556], [Json Connection TCP Port]) dnl raw 
default + 1000
 
 AC_SUBST([BUG_URL])
 AC_SUBST([WIKI_URL])

Modified: trunk/server/srv_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/srv_main.c?rev=28639&r1=28638&r2=28639&view=diff
==============================================================================
--- trunk/server/srv_main.c     (original)
+++ trunk/server/srv_main.c     Fri Mar 27 21:02:11 2015
@@ -231,7 +231,11 @@
   srvarg.serverid[0] = '\0';
 
   srvarg.bind_addr = NULL;
+#ifdef FREECIV_JSON_CONNECTION
+  srvarg.port = FREECIV_JSON_PORT;
+#else  /* FREECIV_JSON_CONNECTION */
   srvarg.port = DEFAULT_SOCK_PORT;
+#endif /* FREECIV_JSON_CONNECTION */
 
   srvarg.bind_meta_addr = NULL;
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to