From b95482e72906c7bea907f19ef81a659ba37497cc Mon Sep 17 00:00:00 2001 From: jsorg71 Date: Mon, 25 Oct 2004 03:23:48 +0000 Subject: work on logon edits --- xrdp/os_calls.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'xrdp/os_calls.c') diff --git a/xrdp/os_calls.c b/xrdp/os_calls.c index a9663a00..bed917c3 100644 --- a/xrdp/os_calls.c +++ b/xrdp/os_calls.c @@ -55,7 +55,7 @@ static int g_term = 0; #ifdef MEMLEAK static int g_memsize = 0; static int g_memid = 0; -struct xrdp_list* g_memlist = 0; +static struct xrdp_list* g_memlist = 0; #endif /*****************************************************************************/ @@ -254,9 +254,9 @@ int g_tcp_set_non_blocking(int sck) #ifdef _WIN32 i = 1; - ioctlsocket(sck, FIONBIO, &i); -#else - i = fcntl(sck, F_GETFL); + ioctlsocket(sck, FIONBIO, &i); +#else + i = fcntl(sck, F_GETFL); i = i | O_NONBLOCK; fcntl(sck, F_SETFL, i); #endif @@ -633,6 +633,16 @@ char* g_strcpy(char* dest, char* src) return strcpy(dest, src); } +/*****************************************************************************/ +char* g_strncpy(char* dest, char* src, int len) +{ + char* rv; + + rv = strncpy(dest, src, len); + dest[len] = 0; + return rv; +} + /*****************************************************************************/ char* g_strcat(char* dest, char* src) { -- cgit v1.2.3