[Wine-patches] [eterhack] server: Add an environment variable for a persistence delay.

Alexander Morozov amorozov на etersoft.ru
Чт Окт 15 21:00:43 MSD 2009


----------- следующая часть -----------
From 7f63f38991498da6c0750d19d7b3a36a9831afef Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Thu, 15 Oct 2009 20:54:51 +0400
Subject: [eterhack] server: Add an environment variable for a persistence delay.

---
 server/main.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/server/main.c b/server/main.c
index 938bacb..b6a1e02 100644
--- a/server/main.c
+++ b/server/main.c
@@ -64,6 +64,13 @@ static void usage(void)
     fprintf(stderr, "\n");
 }
 
+static void check_persist_env(void)
+{
+    char *persist = getenv( "WINEPERSISTENCE" );
+    if (!persist) return;
+    master_socket_timeout = (timeout_t)atoi( persist ) * -TICKS_PER_SEC;
+}
+
 static void parse_args( int argc, char *argv[] )
 {
     int ret, optc;
@@ -132,6 +139,7 @@ static void sigterm_handler( int signum )
 int main( int argc, char *argv[] )
 {
     setvbuf( stderr, NULL, _IOLBF, 0 );
+    check_persist_env();
     parse_args( argc, argv );
 
     /* setup temporary handlers before the real signal initialization is done */
-- 
1.6.4.4



Подробная информация о списке рассылки Wine-patches