diff options
Diffstat (limited to 'server-client.c')
-rw-r--r-- | server-client.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server-client.c b/server-client.c index 5f61f5c0..5923eb0e 100644 --- a/server-client.c +++ b/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD$ */ +/* $Id$ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -19,9 +19,9 @@ #include <sys/types.h> #include <sys/ioctl.h> +#include <errno.h> #include <event.h> #include <fcntl.h> -#include <paths.h> #include <stdlib.h> #include <string.h> #include <time.h> @@ -825,9 +825,12 @@ server_client_msg_dispatch(struct client *c) case MSG_IDENTIFY: if (datalen != sizeof identifydata) fatalx("bad MSG_IDENTIFY size"); + memcpy(&identifydata, imsg.data, sizeof identifydata); +#ifdef __CYGWIN__ + imsg.fd = open(identifydata.ttyname, O_RDWR|O_NOCTTY); +#endif if (imsg.fd == -1) fatalx("MSG_IDENTIFY missing fd"); - memcpy(&identifydata, imsg.data, sizeof identifydata); server_client_msg_identify(c, &identifydata, imsg.fd); break; |