Commit 8341daca authored by Avuton Olrich's avatar Avuton Olrich

client_new: Send greeting using send() rather than write().

This is portable for win32 and fixes client logins there.
parent 136759a2
......@@ -24,6 +24,12 @@
#include "permission.h"
#include <assert.h>
#include <sys/types.h>
#ifdef WIN32
#include <winsock2.h>
#else
#include <sys/socket.h>
#endif
#include <unistd.h>
#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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment