[monopd] 02/06: Imported Upstream version 0.9.8

Markus Koschany apo-guest at moszumanska.debian.org
Tue Mar 24 12:35:22 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 8f47f34d97a4d37e2907009656aa40492628267d
Author: Markus Koschany <apo at gambaru.de>
Date:   Tue Mar 24 12:37:39 2015 +0100

    Imported Upstream version 0.9.8
---
 API                       |  24 +++----
 ChangeLog                 |  35 +++++++----
 NEWS                      |  35 +++++++----
 README.monopigator        |   6 +-
 TODO                      |   2 +-
 conf/monopd.conf-dist     |   2 +-
 configure                 | 156 +++++++++++++++++++++++++++++++++++++++++++++-
 configure.ac              |  11 ++--
 doc/api/gameboard         |   2 +-
 doc/systemd/monopd.socket |   1 +
 src/game.cpp              |  10 +--
 src/game.h                |   2 +-
 src/listener.cpp          |   2 +-
 src/player.cpp            |  12 ++--
 14 files changed, 240 insertions(+), 60 deletions(-)

diff --git a/API b/API
index 15cfea0..0023f81 100644
--- a/API
+++ b/API
@@ -1,7 +1,7 @@
 ===============================================================================
 monopd API
 
-Revision: 0.9.7
+Revision: 0.9.8
 
 Erik Bourget <ebourg at po-box.mcgill.ca>
 Rob Kaper <cap at capsi.com>
@@ -26,7 +26,7 @@ i. protocol notes
 -----------------
 
 Commands from clients to the monopd server are in the form of a tiny message
-preceeded by a dot and followed by a newline:
+preceded by a dot and followed by a newline:
 
 .gn
 
@@ -43,7 +43,7 @@ message such as
 	</gamelist>
 </monopd>
 
-should be parsed by clients as five seperate (and all invalid) messages.
+should be parsed by clients as five separate (and all invalid) messages.
 
 <monopd><msg type="info" value="Rob throws a 6 and a 2."/></monopd>
 
@@ -53,15 +53,15 @@ Further example messages in this document will however be wrapped using
 newlines, for readability.
 
 There have been complaints of monopd sending multiple root elements in one
-"document", but unless there's a bug somewhere, newline seperated messages
-itself should not contain more than one root element. Please do treat data
+"document", but unless there's a bug somewhere, newline-separated messages
+themselves should not contain more than one root element. Please do treat data
 after a newline as a new document. Most modern network APIs provide methods
 such as canReadLine() and readLine() which are optimised for this usage.
 
 Not all fields of the XML messages are sent on every update; clients are to
 assume that anything not referred to is either undefined if there has been no
 previous mention of the attribute, or that it keeps the same value as the
-last update that included it set it to. These incremental updates decreases
+last update that included it set it to. These incremental updates decrease
 the amount of data sent over the network.
 
 The encoding of the protocol is UTF-8.
@@ -71,7 +71,7 @@ ii. server introduction
 
 The server identifies itself with an introductory XML message:
 
-<monopd><server version="0.9.7"/>
+<monopd><server version="0.9.8"/>
 
 The client must then complete the handshake by using the "set name" command:
 
@@ -150,7 +150,7 @@ server.
 .Tm$1:$2:$3:$4 : Player $2 gives $3 an amount of $4 as part of trade $1.
 .Ta$1:$2       : Accept current (revision $2) terms of trade with tradeid $1.
 .Ta$1          : Accept current terms of trade with tradeid $1. (WARNING:
-                 deprecated. Exists for backwards compatiblity but clients
+                 deprecated. Exists for backwards compatibility but clients
                  are encouraged to use the above command instead)
 .Tr$1          : Reject trade $1.
 
@@ -214,7 +214,7 @@ server.
 ===============================================================================
 
 While they won't come like this from the server, I've split some messages
-onto more than one line for readibility.  Each line of messages is enclosed
+onto more than one line for readability.  Each line of messages is enclosed
 by <monopd> and </monopd>.
 
 --------------------
@@ -273,7 +273,7 @@ WARNING: DEPRECATED, see <gameupdate> and <deletegame>.
     bankrupt="bool" hasturn="bool" can_roll="bool" can_buyestate="bool"
     host="string" spectator="bool" hasdebt="bool" canauction="bool" canusecard="bool" />
 
-Most of these are obvious. Directmove is a suggestion to clients about if
+Most of these are obvious. Directmove is a suggestion to clients whether
 they should animate tokens (or not, directmove is 1 for "go directly to
 jail"). Master is 1 or 0 depending on whether the player is the controlling
 player in a game and spectator indicates whether a player is participating
@@ -335,7 +335,7 @@ proposal or including cards and estates (targetplayer is a playerid, or -1
 when a component is removed, money objects are removed when money is 0),
 "accepted" (at which point the ownerships are being transferred).
 
-Actor is the playerid of the player initiating the tradeof rejecting it.
+Actor is the playerid of the player initiating the trade or rejecting it.
 
 Tradeplayer's accept field denotes whether that player has agreed to the
 current terms of the trade; this is reset to 0 upon any change and must be
@@ -417,7 +417,7 @@ can_roll or estateupdate can_toggle_mortgage.
 </configupdate>
 
 Allows clients to view/configure options (editing might only be available
-before game start!). Supported types are: bool. Edit is a boolean to tell
+before the game starts!). Supported types are: bool. Edit is a boolean to tell
 clients whether this option can be edited or not. Commands should be
 postfixed with the configuration value: for bools 0 or 1, such as .geaf1
 
diff --git a/ChangeLog b/ChangeLog
index 6288d75..d890ea3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,16 +1,27 @@
+0.9.8
+-----
+
+- fixed CVE-2015-0841: off-by-one error in network code
+- check for libsystemd in preference to libsystemd-daemon
+- fixed a lot of typographical and grammatical errors
+- fixed systemd unit file example: it is not allowed to create a stand-alone
+  Description field, moved to [Unit] section
+
 0.9.7
 -----
 
 - bugfix: wrong estate was chosen when selling an estate, the current estate
-  was chosen instead of the player selected estate
+  was chosen instead of the player-selected estate
 - bugfix: fixed bind() on Mac OS X and probably some others
 
 0.9.6
 -----
 
-- DOC: added User and Group stanzas in systemd service unit-file as a hint for packagers
+- DOC: added User and Group stanzas in systemd service unit-file as a hint for
+  packagers
 - bugfix: fixed broken formats on x86_64, %ld on int instead of %d
-- bugfix: fixed XML escaping for "You do not have enough money to buy this property, B & O Railroad costs 200."
+- bugfix: fixed XML escaping for "You do not have enough money to buy this
+  property, B & O Railroad costs 200."
 - API: added gameid attribute to the new configupdate protocol
 
 0.9.5
@@ -158,11 +169,11 @@
 - bugfix: change master attribute before sending playerupdate when creating a game
 - bugfix: init Auction::m_highBidder in constructor
 - bugfix: proper check for housePrice in Player::buyHouse
-- bugfix: don't mess with auction events when on unsuccesful bid
+- bugfix: don't mess with auction events when on unsuccessful bid
 - bugfix: allow building *houses* when max hotels reached
 - bugfix: change player name in game description
 - bugfix: only set edit=1 for master in configupdate
-- bugfix: unmortgage estates thatare sold to the bank on bankrupcy
+- bugfix: unmortgage estates thatare sold to the bank on bankruptcy
 
 2002-12-24 (monopd-0.6.2)
 ----------
@@ -196,7 +207,7 @@
 - gcc 3.2 compilation fixes
 - updated DESIGN document
 - deleting tradecomponents in trade deconstructor no longer crashes
-- CONFIG: Card::jailcard is now seperated into Card::outofjail bool and
+- CONFIG: Card::jailcard is now separated into Card::outofjail bool and
   Card::canbeowned bool, to allow for different types of ownable cards in the
   future
 - support for trading of jail cards
@@ -217,7 +228,7 @@
 - CONFIG: move min/max players to config file
 - ported to libcapsinetwork 0.2.0
 - API: moved newturn message to playerupdate attribute hasturn
-- remove Cards+Estates from Trades when owner changes (bankrupcy/trade/card usage)
+- remove Cards+Estates from Trades when owner changes (bankruptcy/trade/card usage)
 - API: allow for reconnect with .R
 - handle passing of estates elegantly
 - CONFIG: remove nexutil and nextrr with advancetonextof=groupname,
@@ -227,7 +238,7 @@
 ----------
 
 - if you are insolvent on third roll of the dice in jail it doesn't end the turn right
-- correctly move player to destination on succesful jail roll
+- correctly move player to destination on successful jail roll
 - allow players to go "back" (leaving a game)
 - valgrind fixes, including huge memory leak in escapeXML
 - free parking target for estates (cards/jail/taxes)
@@ -795,7 +806,7 @@
 2001-06-19 (cap)
 ----------
 
-- Changed game name into description (makes more sense) and issued seperate
+- Changed game name into description (makes more sense) and issued separate
   command for it (.gd) so the master can change the description.
 - Prepared some stuff for Chance/CC jailcards.
 
@@ -823,7 +834,7 @@
 ----------
 
 - Bugfix: double count must be reset after being sent to jail.
-- Added Player::solvent() function to seperate money checking from
+- Added Player::solvent() function to separate money checking from
   Player::pay()
 - B & O Railroad -> B & O Railroad. Change is currently in config file,
   I guess we should transform it ourselves before sending as XML?
@@ -999,7 +1010,7 @@ instead of 1.1.1.x ?
 2001-04-28
 ----------
 
-- API decision: messages are seperated by newlines. Syntax within a message
+- API decision: messages are separated by newlines. Syntax within a message
   is yet unspecified, although it will probably use a subset of XML.
 - gamelist is printed in tiny XML.
 
@@ -1008,7 +1019,7 @@ instead of 1.1.1.x ?
 
 - turn-based game, .r only allowed on players turn [Milestone I bugfix]
 - complete redesign of user, game, player and ownership relations
-- seperate class for estate entities, names and prices from file
+- separate class for estate entities, names and prices from file
 - to_jail property for estates
 - buying properties and collecting rent are supported in the game, however
   there are no commands in the API yet to buy properties. unowned properties
diff --git a/NEWS b/NEWS
index 6288d75..d890ea3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,16 +1,27 @@
+0.9.8
+-----
+
+- fixed CVE-2015-0841: off-by-one error in network code
+- check for libsystemd in preference to libsystemd-daemon
+- fixed a lot of typographical and grammatical errors
+- fixed systemd unit file example: it is not allowed to create a stand-alone
+  Description field, moved to [Unit] section
+
 0.9.7
 -----
 
 - bugfix: wrong estate was chosen when selling an estate, the current estate
-  was chosen instead of the player selected estate
+  was chosen instead of the player-selected estate
 - bugfix: fixed bind() on Mac OS X and probably some others
 
 0.9.6
 -----
 
-- DOC: added User and Group stanzas in systemd service unit-file as a hint for packagers
+- DOC: added User and Group stanzas in systemd service unit-file as a hint for
+  packagers
 - bugfix: fixed broken formats on x86_64, %ld on int instead of %d
-- bugfix: fixed XML escaping for "You do not have enough money to buy this property, B & O Railroad costs 200."
+- bugfix: fixed XML escaping for "You do not have enough money to buy this
+  property, B & O Railroad costs 200."
 - API: added gameid attribute to the new configupdate protocol
 
 0.9.5
@@ -158,11 +169,11 @@
 - bugfix: change master attribute before sending playerupdate when creating a game
 - bugfix: init Auction::m_highBidder in constructor
 - bugfix: proper check for housePrice in Player::buyHouse
-- bugfix: don't mess with auction events when on unsuccesful bid
+- bugfix: don't mess with auction events when on unsuccessful bid
 - bugfix: allow building *houses* when max hotels reached
 - bugfix: change player name in game description
 - bugfix: only set edit=1 for master in configupdate
-- bugfix: unmortgage estates thatare sold to the bank on bankrupcy
+- bugfix: unmortgage estates thatare sold to the bank on bankruptcy
 
 2002-12-24 (monopd-0.6.2)
 ----------
@@ -196,7 +207,7 @@
 - gcc 3.2 compilation fixes
 - updated DESIGN document
 - deleting tradecomponents in trade deconstructor no longer crashes
-- CONFIG: Card::jailcard is now seperated into Card::outofjail bool and
+- CONFIG: Card::jailcard is now separated into Card::outofjail bool and
   Card::canbeowned bool, to allow for different types of ownable cards in the
   future
 - support for trading of jail cards
@@ -217,7 +228,7 @@
 - CONFIG: move min/max players to config file
 - ported to libcapsinetwork 0.2.0
 - API: moved newturn message to playerupdate attribute hasturn
-- remove Cards+Estates from Trades when owner changes (bankrupcy/trade/card usage)
+- remove Cards+Estates from Trades when owner changes (bankruptcy/trade/card usage)
 - API: allow for reconnect with .R
 - handle passing of estates elegantly
 - CONFIG: remove nexutil and nextrr with advancetonextof=groupname,
@@ -227,7 +238,7 @@
 ----------
 
 - if you are insolvent on third roll of the dice in jail it doesn't end the turn right
-- correctly move player to destination on succesful jail roll
+- correctly move player to destination on successful jail roll
 - allow players to go "back" (leaving a game)
 - valgrind fixes, including huge memory leak in escapeXML
 - free parking target for estates (cards/jail/taxes)
@@ -795,7 +806,7 @@
 2001-06-19 (cap)
 ----------
 
-- Changed game name into description (makes more sense) and issued seperate
+- Changed game name into description (makes more sense) and issued separate
   command for it (.gd) so the master can change the description.
 - Prepared some stuff for Chance/CC jailcards.
 
@@ -823,7 +834,7 @@
 ----------
 
 - Bugfix: double count must be reset after being sent to jail.
-- Added Player::solvent() function to seperate money checking from
+- Added Player::solvent() function to separate money checking from
   Player::pay()
 - B & O Railroad -> B & O Railroad. Change is currently in config file,
   I guess we should transform it ourselves before sending as XML?
@@ -999,7 +1010,7 @@ instead of 1.1.1.x ?
 2001-04-28
 ----------
 
-- API decision: messages are seperated by newlines. Syntax within a message
+- API decision: messages are separated by newlines. Syntax within a message
   is yet unspecified, although it will probably use a subset of XML.
 - gamelist is printed in tiny XML.
 
@@ -1008,7 +1019,7 @@ instead of 1.1.1.x ?
 
 - turn-based game, .r only allowed on players turn [Milestone I bugfix]
 - complete redesign of user, game, player and ownership relations
-- seperate class for estate entities, names and prices from file
+- separate class for estate entities, names and prices from file
 - to_jail property for estates
 - buying properties and collecting rent are supported in the game, however
   there are no commands in the API yet to buy properties. unowned properties
diff --git a/README.monopigator b/README.monopigator
index 08f67f6..5419f89 100644
--- a/README.monopigator
+++ b/README.monopigator
@@ -9,7 +9,7 @@ Contents
 ---------------
 
 In order to make it easier to find people to play against, monopd can be run
-as dedicated game server and clients can request a list of available servers
+as a dedicated game server and clients can request a list of available servers
 on-line. This document describes the implementation of this technique and
 how to enable it in monopd.
 
@@ -19,7 +19,7 @@ how to enable it in monopd.
 http://monopd.unixcode.org/ returns a XML page like this:
  
 <monopigator>
-  <server ipaddr="1.2.3.4" host="monopd.unixcode.org" port="1234" version="0.9.7" users="1"/>
+  <server ipaddr="1.2.3.4" host="monopd.unixcode.org" port="1234" version="0.9.8" users="1"/>
 </monopigator>
  
 Parse it and your client is good to go (a value of -1 for users indicates
@@ -37,7 +37,7 @@ to monopd.unixcode.org:
 http://monopd.unixcode.org/register.php?host=monopd.mydomain.net&port=1234&version=0.2.1-CVS
 
 This keeps a server in the database for three minutes. So you'll have to
-register continously. Fortunately monopd can do this for you, but it does
+register continuously. Fortunately monopd can do this for you, but it does
 _not_ register by default. It will only register automatically when you
 enable it in the configuration.
 
diff --git a/TODO b/TODO
index 0ce8daf..4cbdc63 100644
--- a/TODO
+++ b/TODO
@@ -29,7 +29,7 @@ For 0.10.0 and onwards
   - merge .Tc and .Te into .Tu
 - have auctions for estates when player goes bankrupt on bank
   - include estateId in bid command to avoid mistakes
-- allow for unmortgaging without 10% fee after transfer due to bankrupcy
+- allow for unmortgaging without 10% fee after transfer due to bankruptcy
 - wishlist: force default rules (for tournament servers)
 - API: password to join/watch games
 
diff --git a/conf/monopd.conf-dist b/conf/monopd.conf-dist
index 92b403b..cd18b12 100644
--- a/conf/monopd.conf-dist
+++ b/conf/monopd.conf-dist
@@ -11,7 +11,7 @@ port=1234
 # Frequency of monopigator registrations in seconds. The monopigator XML
 # database only returns severs who have registered during the past 300
 # seconds, so make this value smaller than 300 if you want your server to
-# appear continously. The minimum value is 60.
+# appear continuously. The minimum value is 60.
 #
 gatorfrequency=180
 
diff --git a/configure b/configure
index ab820b4..701212b 100755
--- a/configure
+++ b/configure
@@ -2443,7 +2443,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=monopd
- VERSION=0.9.7
+ VERSION=0.9.8
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5561,6 +5561,150 @@ if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
     pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SYSTEMD_DAEMON_LIBS"; then
+    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
+        else
+	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
+$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
+
+if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
+    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SYSTEMD_DAEMON_LIBS"; then
+    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
+        else
+	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
+
+	if test "x$USE_SYSTEMD_DAEMON" = "xyes"; then :
+  as_fn_error $? "systemd startup notification support requested, but libsystemd-daemon not found." "$LINENO" 5
+
+fi
+
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	if test "x$USE_SYSTEMD_DAEMON" = "xyes"; then :
+  as_fn_error $? "systemd startup notification support requested, but libsystemd-daemon not found." "$LINENO" 5
+
+fi
+
+else
+	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
+	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define USE_SYSTEMD_DAEMON 1" >>confdefs.h
+
+fi
+
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
+$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
+
+if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
+    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
   ac_status=$?
@@ -5634,6 +5778,16 @@ $as_echo "#define USE_SYSTEMD_DAEMON 1" >>confdefs.h
 
 fi
 
+else
+	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
+	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define USE_SYSTEMD_DAEMON 1" >>confdefs.h
+
+fi
+
 fi
 
 if test "x$GCC" = "xyes"; then  \
diff --git a/configure.ac b/configure.ac
index 14fd718..0d49e05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script.
 AC_INIT(src/main.cpp)
-AM_INIT_AUTOMAKE(monopd, 0.9.7)
+AM_INIT_AUTOMAKE(monopd, 0.9.8)
 AM_CONFIG_HEADER(config.h)
 AC_LANG(C++)
 
@@ -29,10 +29,13 @@ AC_ARG_WITH([systemd-daemon], AS_HELP_STRING([--with-systemd-daemon],
             [Add support for systemd startup notification (default is autodetected)]),
             [USE_SYSTEMD_DAEMON=$withval], [USE_SYSTEMD_DAEMON=auto])
 AS_IF([test "x$USE_SYSTEMD_DAEMON" != "xno"], [
-    PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
+    PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd],
         [AC_DEFINE(USE_SYSTEMD_DAEMON, 1, [Use systemd startup notification])],
-        [AS_IF([test "x$USE_SYSTEMD_DAEMON" = "xyes"],
-            [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd-daemon not found.])]
+        [PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
+            [AC_DEFINE(USE_SYSTEMD_DAEMON, 1, [Use systemd startup notification])],
+            [AS_IF([test "x$USE_SYSTEMD_DAEMON" = "xyes"],
+                [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd-daemon not found.])]
+            )]
         )]
     )
 ])
diff --git a/doc/api/gameboard b/doc/api/gameboard
index b6f5f21..190368f 100644
--- a/doc/api/gameboard
+++ b/doc/api/gameboard
@@ -1,5 +1,5 @@
 This document described the configuration syntax of monopd game configuration
-files. See the the actualy configuration files within games/ to see how
+files. See the actual configuration files within games/ to see how
 this syntax is applied.
 
 Configuration Groups
diff --git a/doc/systemd/monopd.socket b/doc/systemd/monopd.socket
index 60d1993..3dd9896 100644
--- a/doc/systemd/monopd.socket
+++ b/doc/systemd/monopd.socket
@@ -1,3 +1,4 @@
+[Unit]
 Description=monopd listening socket
 
 [Socket]
diff --git a/src/game.cpp b/src/game.cpp
index aa98cd7..d4dcf7d 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -388,7 +388,7 @@ void Game::editConfiguration(Player *pInput, char *data)
 
 	if (!strstr(data, ":"))
 	{
-		pInput->ioError("Invalid input for .gc, no seperator after configId");
+		pInput->ioError("Invalid input for .gc, no separator after configId");
 		return;
 	}
 	int configId = atoi(strsep(&data, ":"));
@@ -907,12 +907,12 @@ void Game::delAuction()
 	m_auction = 0;
 }
 
-// Returns 0 on succesful bid, 1 on error.
+// Returns 0 on successful bid, 1 on error.
 int Game::bidInAuction(Player *pInput, char *data)
 {
 	if (!strstr(data, ":"))
 	{
-		pInput->ioError("Invalid input for .ab, no seperator after auctionId");
+		pInput->ioError("Invalid input for .ab, no separator after auctionId");
 		return 1;
 	}
 	int auctionId = atoi(strsep(&data, ":"));
@@ -1008,7 +1008,7 @@ void Game::acceptTrade(Player *pInput, char *data)
 	// data looks like "1:1", tradeid, revision
 	if (!strstr(data, ":"))
 	{
-//		ioError("Invalid input for .Ta, no seperator after tradeId");
+//		ioError("Invalid input for .Ta, no separator after tradeId");
 //		return;
 		ignoreRevision = true; // backwards compatibility
 		tradeId = atoi(data);
@@ -1836,7 +1836,7 @@ bool Game::giveCard(Player *pTurn, Estate *estate, Card *card)
 {
 	if (!card)
 	{
-		ioError(pTurn->name() + " should get a card, but there doesn't seem to be any available!");
+		ioError(pTurn->name() + " should get a card, but there don't seem to be any available!");
 		return true;
 	}
 	setDisplay(estate, false, false, "%s", card->getStringProperty("name").c_str());
diff --git a/src/game.h b/src/game.h
index b2ab9f5..2df1ceb 100644
--- a/src/game.h
+++ b/src/game.h
@@ -117,7 +117,7 @@ class Game : public GameObject
 		void enforceDebt(Player *pBroke, Debt *debt = 0);
 		void newAuction(Player *pInput);
 		Auction *auction();
-		// Returns 0 on succesful bid, 1 on error.
+		// Returns 0 on successful bid, 1 on error.
 		int bidInAuction(Player *pInput, char *data);
 		void delAuction();
 
diff --git a/src/listener.cpp b/src/listener.cpp
index 1f23fca..fd5bf30 100644
--- a/src/listener.cpp
+++ b/src/listener.cpp
@@ -142,7 +142,7 @@ void Listener::checkActivity()
 	{
 		if ( (*it)->status() == Socket::Ok && FD_ISSET( (*it)->fd(), &m_fdset ) )
 		{
-			char *readBuf = new char[MAXLINE];
+			char *readBuf = new char[MAXLINE+1]; // MAXLINE + '\0'
 			int n = read((*it)->fd(), readBuf, MAXLINE);
 			if (n <= 0) // socket was closed
 			{
diff --git a/src/player.cpp b/src/player.cpp
index 7cb756b..74d90e0 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -725,14 +725,14 @@ void Player::updateTradeObject(char *data)
 	// data looks like "1:10:1", tradeid, objectid, playerid
 	if (!strstr(data, ":"))
 	{
-		ioError("Invalid input, no seperator after tradeId");
+		ioError("Invalid input, no separator after tradeId");
 		return;
 	}
 	int tradeId = atoi(strsep(&data, ":"));
 
 	if (!strstr(data, ":"))
 	{
-		ioError("Invalid input, no seperator after objectId");
+		ioError("Invalid input, no separator after objectId");
 		return;
 	}
 	int objectId = atoi(strsep(&data, ":"));
@@ -776,7 +776,7 @@ void Player::updateTradeObject(char *data)
 		Card *card = m_game->findCard(objectId);
 		if (!card || !card->owner())
 		{
-			ioError("Noone owns a card with cardId %d.", objectId);
+			ioError("No one owns a card with cardId %d.", objectId);
 			return;
 		}
 		object = card;
@@ -794,21 +794,21 @@ void Player::updateTradeMoney(char *data)
 	// data looks like "1:1:1:100", tradeid, playerfrom, playerto, money
 	if (!strstr(data, ":"))
 	{
-		ioError("Invalid input for .Tm, no seperator after tradeId");
+		ioError("Invalid input for .Tm, no separator after tradeId");
 		return;
 	}
 	int tradeId = atoi(strsep(&data, ":"));
 
 	if (!strstr(data, ":"))
 	{
-		ioError("Invalid input for .Tm, no seperator after playerFromId");
+		ioError("Invalid input for .Tm, no separator after playerFromId");
 		return;
 	}
 	int playerFromId = atoi(strsep(&data, ":"));
 
 	if (!strstr(data, ":"))
 	{
-		ioError("Invalid input for .Tm, no seperator after playerToId");
+		ioError("Invalid input for .Tm, no separator after playerToId");
 		return;
 	}
 

-- 
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