Author: cazfi
Date: Sun Mar  1 02:10:06 2015
New Revision: 28334

URL: http://svn.gna.org/viewcvs/freeciv?rev=28334&view=rev
Log:
Build LAN announcement functionality even when json protocol enabled

See patch #5849

Modified:
    trunk/server/sernet.c

Modified: trunk/server/sernet.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/sernet.c?rev=28334&r1=28333&r2=28334&view=diff
==============================================================================
--- trunk/server/sernet.c       (original)
+++ trunk/server/sernet.c       Sun Mar  1 02:10:06 2015
@@ -128,10 +128,7 @@
 static void send_ping_times_to_all(void);
 
 static void get_lanserver_announcement(void);
-
-#ifndef FREECIV_JSON_CONNECTION
 static void send_lanserver_response(void);
-#endif
 
 static bool no_input = FALSE;
 
@@ -1409,11 +1406,9 @@
 {
   fd_set readfs, exceptfs;
   struct timeval tv;
-#ifndef FREECIV_JSON_CONNECTION
   char msgbuf[128];
   struct data_in din;
   int type;
-#endif /* FREECIV_JSON_CONNECTION */
 
   if (srvarg.announce == ANNOUNCE_NONE) {
     return;
@@ -1437,7 +1432,6 @@
   }
 
     /* We would need a raw network connection for broadcast messages */
-#ifndef FREECIV_JSON_CONNECTION
   if (FD_ISSET(socklan, &readfs)) {
     if (0 < recvfrom(socklan, msgbuf, sizeof(msgbuf), 0, NULL, NULL)) {
       dio_input_init(&din, msgbuf, 1);
@@ -1450,7 +1444,6 @@
       }
     }
   }
-#endif /* FREECIV_JSON_CONNECTION */
 }
 
 /********************************************************************
@@ -1458,7 +1451,6 @@
   that requests information about the server state.
 ********************************************************************/
   /* We would need a raw network connection for broadcast messages */
-#ifndef FREECIV_JSON_CONNECTION
 static void send_lanserver_response(void)
 {
 #ifndef HAVE_WINSOCK
@@ -1573,4 +1565,3 @@
 
   fc_closesocket(socksend);
 }
-#endif /* FREECIV_JSON_CONNECTION */


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

Reply via email to