GreetUser() doen't need to return the X display pointer.

This commit is contained in:
matthieu 2016-11-06 12:41:24 +00:00
parent 6ba2835960
commit abef35bfcd
3 changed files with 6 additions and 7 deletions

View File

@ -295,21 +295,21 @@ FailedLogin (struct display *d, const char *username)
_X_EXPORT
greet_user_rtn GreetUser(
struct display *d,
Display ** dpy,
struct verify_info *verify,
struct greet_info *greet)
{
int i;
Arg arglist[2];
Display *dpy;
*dpy = InitGreet (d);
dpy = InitGreet (d);
/*
* Run the setup script - note this usually will not work when
* the server is grabbed, so we don't even bother trying.
*/
if (!d->grabServer)
SetupDisplay (d);
if (!*dpy) {
if (!dpy) {
LogError ("Cannot reopen display %s for greet window\n", d->name);
exit (RESERVER_DISPLAY);
}
@ -342,7 +342,7 @@ greet_user_rtn GreetUser(
bzero (greet->password, strlen(greet->password));
}
}
DeleteXloginResources (d, *dpy);
DeleteXloginResources (d, dpy);
CloseGreet (d);
Debug ("Greet loop finished %d\n", getpid());
/*

View File

@ -62,7 +62,7 @@ typedef enum {
* option such as SECURE_RPC or K5AUTH.
*/
extern greet_user_rtn GreetUser(struct display *, Display **,
extern greet_user_rtn GreetUser(struct display *,
struct verify_info *, struct greet_info *);
extern greet_user_rtn AutoLogin(struct display *,

View File

@ -147,7 +147,6 @@ __dead void
ManageSession (struct display *d)
{
pid_t pid = 0;
Display *dpy;
greet_user_rtn greet_stat;
Debug ("ManageSession %s\n", d->name);
@ -159,7 +158,7 @@ ManageSession (struct display *d)
if (d->autoLogin == NULL || d->autoLogin[0] == '\0') {
/* Load system default Resources */
LoadXloginResources (d);
greet_stat = GreetUser(d, &dpy, &verify, &greet);
greet_stat = GreetUser(d, &verify, &greet);
} else
greet_stat = AutoLogin(d, &verify, &greet);