Gentoo Archives: gentoo-commits

From: "Andreas HAttel (dilfridge)" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in kde-base/kdm/files: kdm-4.7.3-revertcrashlogic.patch
Date: Sun, 20 Nov 2011 21:49:12
Message-Id: 20111120214902.745962004B@flycatcher.gentoo.org
1 dilfridge 11/11/20 21:49:02
2
3 Added: kdm-4.7.3-revertcrashlogic.patch
4 Log:
5 Make xdmcp remote login work again by reverting relevant upstream commit, bug 389757
6
7 (Portage version: 2.1.10.36/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 kde-base/kdm/files/kdm-4.7.3-revertcrashlogic.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdm/files/kdm-4.7.3-revertcrashlogic.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdm/files/kdm-4.7.3-revertcrashlogic.patch?rev=1.1&content-type=text/plain
14
15 Index: kdm-4.7.3-revertcrashlogic.patch
16 ===================================================================
17 diff --git a/kdm/backend/greet.h b/kdm/backend/greet.h
18 index 2ef7026..41f0791 100644
19 --- a/kdm/backend/greet.h
20 +++ b/kdm/backend/greet.h
21 @@ -146,8 +146,6 @@ from the copyright holder.
22 #define G_DChoose 3 /* run chooser */
23 #endif
24
25 -#define G_Interact 4 /* greeter got user input. possible crash is probably not spontaneous. */
26 -
27 #define G_Shutdown 101 /* 5*int, string; async */
28 # define SHUT_REBOOT 1 /* how */
29 # define SHUT_HALT 2
30 diff --git a/kdm/backend/session.c b/kdm/backend/session.c
31 index 85ab1d7..1b47e9c 100644
32 --- a/kdm/backend/session.c
33 +++ b/kdm/backend/session.c
34 @@ -409,12 +409,16 @@ void
35 openGreeter()
36 {
37 char *name, **env;
38 + static time_t lastStart;
39 int cmd;
40 Cursor xcursor;
41
42 gSet(&grttalk);
43 if (grtproc.pid > 0)
44 return;
45 + updateNow();
46 + if (now < lastStart + 10) /* XXX should use some readiness indicator instead */
47 + sessionExit(EX_UNMANAGE_DPY);
48 ASPrintf(&name, "greeter for display %s", td->name);
49 debug("starting %s\n", name);
50
51 @@ -443,6 +447,8 @@ openGreeter()
52 sessionExit(EX_UNMANAGE_DPY);
53 }
54 debug("%s ready\n", name);
55 + updateNow();
56 + lastStart = now;
57 }
58
59 int
60 @@ -544,7 +550,7 @@ manageSession(void)
61 {
62 int ex, cmd;
63 volatile int clientPid = -1;
64 - time_t tdiff, startt;
65 + time_t tdiff;
66
67 debug("manageSession %s\n", td->name);
68 if ((ex = Setjmp(abortSession))) {
69 @@ -576,13 +582,10 @@ manageSession(void)
70 updateNow();
71 tdiff = now - td->hstent->lastExit - td->openDelay;
72 if (autoLogon(tdiff)) {
73 - if (!verify(conv_auto, False)) {
74 - startt = now;
75 + if (!verify(conv_auto, False))
76 goto gcont;
77 - }
78 } else {
79 regreet:
80 - startt = now;
81 openGreeter();
82 #ifdef XDMCP
83 if (((td->displayType & d_location) == dLocal) &&
84 @@ -596,10 +599,6 @@ manageSession(void)
85 G_GreetTimed : G_Greet);
86 gcont:
87 cmd = ctrlGreeterWait(True);
88 - if (cmd == G_Interact) {
89 - startt = 0;
90 - goto gcont;
91 - }
92 #ifdef XDMCP
93 while (cmd == G_DChoose) {
94 choose:
95 @@ -616,9 +615,6 @@ manageSession(void)
96 logError("Received unknown command %d from greeter\n", cmd);
97 closeGreeter(True);
98 }
99 - updateNow();
100 - if (now < startt + 120) /* Greeter crashed spontaneously. Avoid endless loop. */
101 - sessionExit(EX_UNMANAGE_DPY);
102 goto regreet;
103 }
104 }
105 diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp
106 index f169248..1bb744c 100644
107 --- a/kdm/kfrontend/kgapp.cpp
108 +++ b/kdm/kfrontend/kgapp.cpp
109 @@ -74,7 +74,7 @@ sigAlarm(int)
110
111 GreeterApp::GreeterApp(int &argc, char **argv) :
112 inherited(argc, argv),
113 - regrabPtr(false), regrabKbd(false), initalBusy(true), sendInteract(false),
114 + regrabPtr(false), regrabKbd(false), initalBusy(true),
115 dragWidget(0)
116 {
117 pingInterval = _isLocal ? 0 : _pingInterval;
118 @@ -203,14 +203,6 @@ GreeterApp::x11EventFilter(XEvent * ev)
119 break;
120 }
121 break;
122 - default:
123 - return false;
124 - }
125 - if (sendInteract) {
126 - sendInteract = false;
127 - // We assume that no asynchronous communication is going on
128 - // before the first user interaction.
129 - gSendInt(G_Interact);
130 }
131 return false;
132 }
133 @@ -487,7 +479,6 @@ main(int argc ATTR_UNUSED, char **argv)
134 }
135 }
136 QObject::connect(dialog, SIGNAL(ready()), &app, SLOT(markReady()));
137 - app.enableSendInteract();
138 debug("entering event loop\n");
139 rslt = dialog->exec();
140 debug("left event loop\n");
141 diff --git a/kdm/kfrontend/kgapp.h b/kdm/kfrontend/kgapp.h
142 index b7c1b97..0979950 100644
143 --- a/kdm/kfrontend/kgapp.h
144 +++ b/kdm/kfrontend/kgapp.h
145 @@ -37,7 +37,6 @@ class GreeterApp : public QApplication {
146 public:
147 GreeterApp(int &argc, char **argv);
148 void markBusy();
149 - void enableSendInteract() { sendInteract = true; }
150 virtual bool x11EventFilter(XEvent *);
151
152 public Q_SLOTS:
153 @@ -51,7 +50,7 @@ class GreeterApp : public QApplication {
154
155 private:
156 int pingInterval, pingTimerId;
157 - bool regrabPtr, regrabKbd, initalBusy, sendInteract;
158 + bool regrabPtr, regrabKbd, initalBusy;
159 QPoint mouseStartPos, dialogStartPos;
160 QWidget *dragWidget;
161 };