(doit): better error reporting
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4958 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -364,8 +364,12 @@ doit(int sock, int tcpp)
|
|||||||
int len;
|
int len;
|
||||||
|
|
||||||
tmp = get_xsockets (&nsockets, &sockets, tcpp);
|
tmp = get_xsockets (&nsockets, &sockets, tcpp);
|
||||||
if (tmp < 0)
|
if (tmp < 0) {
|
||||||
return 1;
|
fatal (sock, &key, schedule, &me, &him,
|
||||||
|
"Cannot create X socket(s): %s",
|
||||||
|
strerror(errno));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
display_num = tmp;
|
display_num = tmp;
|
||||||
if (tcpp)
|
if (tcpp)
|
||||||
snprintf (display, display_size, "localhost:%u", display_num);
|
snprintf (display, display_size, "localhost:%u", display_num);
|
||||||
@@ -373,11 +377,10 @@ doit(int sock, int tcpp)
|
|||||||
snprintf (display, display_size, ":%u", display_num);
|
snprintf (display, display_size, ":%u", display_num);
|
||||||
if(create_and_write_cookie (xauthfile, xauthfile_size,
|
if(create_and_write_cookie (xauthfile, xauthfile_size,
|
||||||
cookie, cookie_len)) {
|
cookie, cookie_len)) {
|
||||||
syslog(LOG_ERR, "create_and_write_cookie: %m");
|
cleanup(nsockets, sockets);
|
||||||
fatal (sock, &key, schedule, &me, &him,
|
fatal (sock, &key, schedule, &me, &him,
|
||||||
"Cookie-creation failed with: %s",
|
"Cookie-creation failed with: %s",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
cleanup(nsockets, sockets);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user