Make return value of SetPriorityClass() behave the same as setpriority().
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 22 May 2011 13:56:04 +0000 (15:56 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 22 May 2011 13:56:04 +0000 (15:56 +0200)
NEWS
configure.in
src/tincd.c

diff --git a/NEWS b/NEWS
index 792a71f..4b2176e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Version 1.0.15               not released yet
+
+ * Fix ProcessPriority option under Windows.
+
 Version 1.0.14               May  8 2011
 
  * Fixed reading configuration files that do not end with a newline. Again.
index 0f9c2f3..8836ca2 100644 (file)
@@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.61)
 AC_INIT
 AC_CONFIG_SRCDIR([src/tincd.c])
-AM_INIT_AUTOMAKE(tinc, 1.0.14)
+AM_INIT_AUTOMAKE(tinc, 1.0.14+git)
 AC_CONFIG_HEADERS([config.h])
 AM_MAINTAINER_MODE
 
index 40ac038..b3d911b 100644 (file)
@@ -504,7 +504,7 @@ static bool drop_privs() {
 }
 
 #ifdef HAVE_MINGW
-# define setpriority(level) SetPriorityClass(GetCurrentProcess(), (level))
+# define setpriority(level) !SetPriorityClass(GetCurrentProcess(), (level))
 #else
 # define NORMAL_PRIORITY_CLASS 0
 # define BELOW_NORMAL_PRIORITY_CLASS 10