aboutsummaryrefslogtreecommitdiff
path: root/x11/kde4-runtime/files/patch-kdm-backend-dm.c
blob: f92c07bdf95a9182f5dd4c50c673fa7265234206 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Index: dm.c
===================================================================
RCS file: /home/kde/kdebase/kdm/backend/dm.c,v
retrieving revision 1.90.2.3
diff -u -3 -p -r1.90.2.3 dm.c
--- kdm/backend/dm.c	13 Aug 2004 19:21:11 -0000	1.90.2.3
+++ kdm/backend/dm.c	23 Aug 2004 16:32:29 -0000
@@ -1033,7 +1033,7 @@ static void
 MainLoop (void)
 {
     struct display *d;
-    struct timeval tv;
+    struct timeval *tvp, tv;
     time_t to;
     int nready;
     char buf;
@@ -1055,12 +1055,17 @@ MainLoop (void)
 	    to = serverTimeout;
 	if (utmpTimeout < to)
 	    to = utmpTimeout;
-	to -= now;
-	if (to < 0)
-	    to = 0;
-	tv.tv_sec = to;
-	tv.tv_usec = 0;
-	nready = select (WellKnownSocketsMax + 1, &reads, 0, 0, &tv);
+	if (to == TO_INF)
+	    tvp = 0;
+	else {
+	    to -= now;
+	    if (to < 0)
+		to = 0;
+	    tv.tv_sec = to;
+	    tv.tv_usec = 0;
+	    tvp = &tv;
+	}
+	nready = select (WellKnownSocketsMax + 1, &reads, 0, 0, tvp);
 	Debug ("select returns %d\n", nready);
 	time (&now);
 #if !defined(ARC4_RANDOM) && !defined(DEV_RANDOM)