From: Guus Sliepen Date: Sun, 22 May 2011 13:56:04 +0000 (+0200) Subject: Make return value of SetPriorityClass() behave the same as setpriority(). X-Git-Tag: release-1.0.15~8 X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=07ffb1a19859791d419b83a876ba552dadedbf46 Make return value of SetPriorityClass() behave the same as setpriority(). --- diff --git a/NEWS b/NEWS index 792a71f1..4b2176e7 100644 --- 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. diff --git a/configure.in b/configure.in index 0f9c2f31..8836ca2d 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/src/tincd.c b/src/tincd.c index 40ac0383..b3d911b8 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -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