[monopd] 02/04: Imported Upstream version 0.10.2

Markus Koschany apo-guest at moszumanska.debian.org
Sun Sep 6 19:04:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

apo-guest pushed a commit to branch master
in repository monopd.

commit 709e626ecc1ef4825508e49571525158b3813a1c
Author: Markus Koschany <apo at gambaru.de>
Date:   Mon Aug 17 00:59:21 2015 +0200

    Imported Upstream version 0.10.2
---
 API                    |  2 +-
 ChangeLog              |  5 +++++
 NEWS                   |  5 +++++
 configure              |  2 +-
 configure.ac           |  2 +-
 src/auction.cpp        |  2 ++
 src/card.cpp           |  2 ++
 src/cardgroup.cpp      |  2 ++
 src/debt.cpp           |  2 ++
 src/display.cpp        |  2 ++
 src/estate.cpp         |  2 ++
 src/estategroup.cpp    |  2 ++
 src/event.cpp          |  2 ++
 src/game.cpp           |  2 ++
 src/gameconfig.cpp     |  2 ++
 src/gameobject.cpp     |  2 ++
 src/gameproperty.cpp   |  2 ++
 src/io.cpp             |  2 ++
 src/listener.cpp       | 11 ++++++++---
 src/listenport.cpp     |  2 ++
 src/player.cpp         |  2 ++
 src/server.cpp         | 27 +++++++++++++--------------
 src/socket.cpp         |  2 ++
 src/trade.cpp          |  2 ++
 src/tradecomponent.cpp |  2 ++
 25 files changed, 70 insertions(+), 20 deletions(-)

diff --git a/API b/API
index 8986572..3af957c 100644
--- a/API
+++ b/API
@@ -1,7 +1,7 @@
 ===============================================================================
 monopd API
 
-Revision: 0.10.1
+Revision: 0.10.2
 
 Erik Bourget <ebourg at po-box.mcgill.ca>
 Rob Kaper <cap at capsi.com>
diff --git a/ChangeLog b/ChangeLog
index 86426c6..45b0dae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+0.10.2
+------
+
+- fixed systemd socket activation support
+
 0.10.1
 ------
 
diff --git a/NEWS b/NEWS
index 86426c6..45b0dae 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+0.10.2
+------
+
+- fixed systemd socket activation support
+
 0.10.1
 ------
 
diff --git a/configure b/configure
index 759ac72..5b1c654 100755
--- a/configure
+++ b/configure
@@ -2443,7 +2443,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=monopd
- VERSION=0.10.1
+ VERSION=0.10.2
 
 
 cat >>confdefs.h <<_ACEOF
diff --git a/configure.ac b/configure.ac
index 0a61904..cbc050c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script.
 AC_INIT(configure.ac)
-AM_INIT_AUTOMAKE(monopd, 0.10.1)
+AM_INIT_AUTOMAKE(monopd, 0.10.2)
 AM_CONFIG_HEADER(config.h)
 AC_LANG(C++)
 
diff --git a/src/auction.cpp b/src/auction.cpp
index c71a21c..87be634 100644
--- a/src/auction.cpp
+++ b/src/auction.cpp
@@ -15,6 +15,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <stdlib.h>
 
 #include <string>
diff --git a/src/card.cpp b/src/card.cpp
index 815d381..86f48a9 100644
--- a/src/card.cpp
+++ b/src/card.cpp
@@ -15,6 +15,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <stdlib.h>
 
 #include "cardgroup.h"
diff --git a/src/cardgroup.cpp b/src/cardgroup.cpp
index b833425..224a73e 100644
--- a/src/cardgroup.cpp
+++ b/src/cardgroup.cpp
@@ -14,6 +14,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <algorithm>
 
 #include "card.h"
diff --git a/src/debt.cpp b/src/debt.cpp
index d9ddc37..4ad01d3 100644
--- a/src/debt.cpp
+++ b/src/debt.cpp
@@ -14,6 +14,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include "debt.h"
 
 Debt::Debt(Player *from, Player *toPlayer, Estate *toEstate, unsigned int amount)
diff --git a/src/display.cpp b/src/display.cpp
index 7bace82..165e191 100644
--- a/src/display.cpp
+++ b/src/display.cpp
@@ -14,6 +14,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdarg.h>
 
diff --git a/src/estate.cpp b/src/estate.cpp
index 39f5dcd..6b86ccf 100644
--- a/src/estate.cpp
+++ b/src/estate.cpp
@@ -15,6 +15,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <stdlib.h>
 
 #include "estate.h"
diff --git a/src/estategroup.cpp b/src/estategroup.cpp
index 8600ac4..a84f6de 100644
--- a/src/estategroup.cpp
+++ b/src/estategroup.cpp
@@ -14,6 +14,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <stdlib.h>
 #include <iostream>
 
diff --git a/src/event.cpp b/src/event.cpp
index 338553e..a106b3d 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -15,6 +15,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <stdlib.h>
 #include <sys/time.h>
 
diff --git a/src/game.cpp b/src/game.cpp
index f5d1211..34f2e4c 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -15,6 +15,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #define __USE_XOPEN
 #include <stdarg.h>
 #include <stdio.h>
diff --git a/src/gameconfig.cpp b/src/gameconfig.cpp
index 8011fa5..95e9617 100644
--- a/src/gameconfig.cpp
+++ b/src/gameconfig.cpp
@@ -14,6 +14,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include "gameconfig.h"
 
 GameConfig::GameConfig(const std::string &id, const std::string &name, const std::string &description)
diff --git a/src/gameobject.cpp b/src/gameobject.cpp
index 24bf96b..fdf74e6 100644
--- a/src/gameobject.cpp
+++ b/src/gameobject.cpp
@@ -15,6 +15,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <cassert>
 
 #include "gameobject.h"
diff --git a/src/gameproperty.cpp b/src/gameproperty.cpp
index 2f0ee32..06b15df 100644
--- a/src/gameproperty.cpp
+++ b/src/gameproperty.cpp
@@ -14,6 +14,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include "gameobject.h"
 #include "gameproperty.h"
 
diff --git a/src/io.cpp b/src/io.cpp
index 91a1d64..6b4871f 100644
--- a/src/io.cpp
+++ b/src/io.cpp
@@ -15,6 +15,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 //#ifndef _GNU_SOURCE
 //#define _GNU_SOURCE
 //#endif
diff --git a/src/listener.cpp b/src/listener.cpp
index 8f728aa..8e05f84 100644
--- a/src/listener.cpp
+++ b/src/listener.cpp
@@ -14,6 +14,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
@@ -59,10 +61,13 @@ Listener::Listener(MonopdServer *server, const int port)
 	} else
 #endif /* USE_SYSTEMD_DAEMON */
 
-	if ( addListenPort(port) == -1 )
-	{
+	if (addListenPort(port)) {
 		syslog(LOG_ERR, "could not bind port %d, exiting", port);
-		exit(1);
+#if USE_SYSTEMD_DAEMON
+		sd_notifyf(1, "STATUS=Failed to start: could not bind port %d\nERRNO=%d", port, -2);
+		usleep(100000);
+#endif /* USE_SYSTEMD_DAEMON */
+		exit(-2);
 	}
 	else
 		syslog(LOG_NOTICE, "listener: port=[%d]", port);
diff --git a/src/listenport.cpp b/src/listenport.cpp
index 67267f3..d12b16f 100644
--- a/src/listenport.cpp
+++ b/src/listenport.cpp
@@ -14,6 +14,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/socket.h>
diff --git a/src/player.cpp b/src/player.cpp
index c926c36..9deed39 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -15,6 +15,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/server.cpp b/src/server.cpp
index 8e0a469..526325b 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -15,6 +15,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <dirent.h>
 #include <netdb.h>
 #include <stdio.h>
@@ -32,7 +34,6 @@
 
 #include <string>
 
-#include "config.h"
 #include "socket.h"
 #include "auction.h"
 #include "event.h"
@@ -623,14 +624,14 @@ void MonopdServer::loadConfig()
 		return;
 	}
 
-	char str[1024], *buf;
+	char str[1024], *buf, *ret;
 
-	fgets(str, sizeof(str), f);
-	while(!feof(f))
-	{
-		if (str[0]=='#') {}
-		else if (strstr(str, "="))
-		{
+	for (ret = fgets(str, sizeof(str), f); ret && !feof(f); ret = fgets(str, sizeof(str), f)) {
+		if (str[0] == '#') {
+			continue;
+		}
+
+		if (strstr(str, "=")) {
 			buf = strtok(str, "=");
 			if (!strcmp(buf, "port"))
 				m_port = atoi(strtok(NULL, "\n\0"));
@@ -643,7 +644,6 @@ void MonopdServer::loadConfig()
 				m_useMetaserver = true;
 			}
 		}
-		fgets(str, sizeof(str), f);
 	}
 	fclose(f);
 }
@@ -663,7 +663,7 @@ void MonopdServer::loadGameTemplates()
 		exit(-1);
 	}
 	while ((direntp=readdir(dirp)) != NULL) {
-		char str[256], *buf;
+		char str[256], *buf, *ret;
 		std::string name, description;
 
 		if (!strstr(direntp->d_name, ".conf")) {
@@ -677,8 +677,8 @@ void MonopdServer::loadGameTemplates()
 			continue;
 		}
 
-		for (fgets(str, sizeof(str), f); !feof(f); fgets(str, sizeof(str), f)) {
-			if (str[0]=='#') {
+		for (ret = fgets(str, sizeof(str), f); ret && !feof(f); ret = fgets(str, sizeof(str), f)) {
+			if (str[0] == '#') {
 				continue;
 			}
 
@@ -687,8 +687,7 @@ void MonopdServer::loadGameTemplates()
 				goto abort;
 			}
 
-			if (strstr(str, "="))
-			{
+			if (strstr(str, "=")) {
 				buf = strtok(str, "=");
 				if (!strcmp(buf, "name"))
 					name = strtok(NULL, "\n\0");
diff --git a/src/socket.cpp b/src/socket.cpp
index bd4fce5..6c22d67 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -14,6 +14,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <errno.h>
 #include <stdarg.h>
 #include <stdio.h>
diff --git a/src/trade.cpp b/src/trade.cpp
index 9546c9a..3aa329e 100644
--- a/src/trade.cpp
+++ b/src/trade.cpp
@@ -15,6 +15,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <stdarg.h>
 #include <stdio.h>
 
diff --git a/src/tradecomponent.cpp b/src/tradecomponent.cpp
index 07b3252..b16fe32 100644
--- a/src/tradecomponent.cpp
+++ b/src/tradecomponent.cpp
@@ -14,6 +14,8 @@
 // along with this program; see the file COPYING. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "config.h"
+
 #include <stdlib.h>
 
 #include "player.h"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/monopd.git



More information about the Pkg-games-commits mailing list