From 8341daca4a7b9d0274636f760b00539347ac13fb Mon Sep 17 00:00:00 2001 From: Avuton Olrich Date: Sat, 8 May 2010 16:48:01 -0700 Subject: client_new: Send greeting using send() rather than write(). This is portable for win32 and fixes client logins there. --- src/client_new.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client_new.c b/src/client_new.c index beb8e14b7..781a36524 100644 --- a/src/client_new.c +++ b/src/client_new.c @@ -24,6 +24,12 @@ #include "permission.h" #include +#include +#ifdef WIN32 +#include +#else +#include +#endif #include #ifdef HAVE_LIBWRAP @@ -111,7 +117,7 @@ void client_new(int fd, const struct sockaddr *sa, size_t sa_length, int uid) client->send_buf_used = 0; - (void)write(fd, GREETING, sizeof(GREETING) - 1); + (void)send(fd, GREETING, sizeof(GREETING) - 1, 0); client_list_add(client); -- cgit v1.2.3