(doit_active): handle error code from create_and_write_cookie

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6155 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-05-08 01:24:48 +00:00
parent f50d984d02
commit 8afe7e97ba

View File

@@ -371,6 +371,7 @@ doit_active (char *host, char *user,
int i; int i;
size_t rem; size_t rem;
u_int32_t other_port; u_int32_t other_port;
int error;
otherside = connect_host (host, user, &key, schedule, port, otherside = connect_host (host, user, &key, schedule, port,
&me, &him); &me, &him);
@@ -454,8 +455,12 @@ doit_active (char *host, char *user,
snprintf (display, display_size, "localhost:%u", display_num); snprintf (display, display_size, "localhost:%u", display_num);
else else
snprintf (display, display_size, ":%u", display_num); snprintf (display, display_size, ":%u", display_num);
if (create_and_write_cookie (xauthfile, xauthfile_size, cookie, cookie_len)) error = create_and_write_cookie (xauthfile, xauthfile_size,
cookie, cookie_len);
if (error) {
warnx ("failed creating cookie file: %s", strerror(error));
return 1; return 1;
}
status_output (debugpp); status_output (debugpp);
for (;;) { for (;;) {
fd_set fdset; fd_set fdset;