Armin Novak
134a16d522
Fixed WSAEventSelect mode reset.
2015-08-27 15:33:06 +02:00
Armin Novak
e6c23cb534
Implemented Async TCP connect with abort event
...
* Implemented unified freerdp_tcp_connect_timeout with connect abort.
* Implemented unified freerdp_tcp_connect_multi with connect abort.
* Added connect abort to freerdp_tcp_connect.
* Added freerdp_abort_connect and abortEvent.
2015-08-27 15:33:06 +02:00
Bernhard Miklautz
68e8569110
winpr/synch: remove the dependency on winsock.h
...
winsock.h pulls in a lot of defines and dependencies that are not
required and partially unwanted in winpr's core (for parts that are not
related to network). In order to get rid of this dependency and have an
independent defines for extended winpr functions the WINPR_FD_* defines
are used internally (and for exposed functions). Where required, like in
WSAEventSelect, the FD_* is mapped to WINPR_FD_*.
2015-07-14 11:39:41 +02:00
Armin Novak
d18b0fbeb4
Handle API updated.
2015-07-03 09:52:52 +02:00
zihao.jiang
75407edf37
Fix event created for WSAEventSelect: The event we pass to WSAEventSelect should be WSAEVENT instead of normal event.
...
From MSDN, it looks same as CreateEvent(NULL, FALSE, FALSE, NULL):
The WSACreateEvent function creates a manual-reset event object with an initial state of nonsignaled. The event object is unnamed.
However they are not really equivalent. When we use normal event, the WSAEventSelect still works but the event appears to be 'auto-reset'.
2015-07-01 01:52:59 +08:00
Bernhard Miklautz
bf73f4e4f1
Fix unchecked strdups
...
* add missing checks
* adapt function return values where necessary
* add initial test for settings
2015-06-22 19:09:59 +02:00
Marc-André Moreau
35e26020aa
freerdp: patch multiple leaks and OOM errors
2015-05-22 14:14:57 -04:00
Marc-André Moreau
30dd40e10a
wfreerdp: fix and improve remote assistance
2015-05-07 14:20:49 -04:00
Marc-André Moreau
6b1fefea40
freerdp: fix remote assistance mode, add multi-address connection
2015-05-06 16:32:45 -04:00
Norbert Federa
af79c30913
Merge pull request #2554 from akallabeth/event_fix
...
Fix for transport event reset
2015-04-22 11:04:37 +02:00
Bryan Everly
8c75127a67
Necessary changes to get latest branch working on OpenBSD 5.6
2015-04-21 14:42:06 -04:00
Armin Novak
f634e52289
Using auto reset event now.
2015-04-20 15:04:44 +02:00
Armin Novak
5525d9f88b
Fixed uninitialized return value.
2015-04-15 10:38:04 +02:00
Bernhard Miklautz
388d014888
core/tcp: set TCP_USER_TIMEOUT if available
...
Keepalive settings are usually (depending on the implementation) only
used if the TCP connection is idle.
If the network is interrupted/disconnected/... click or keyboard input
generates outgoing traffic therefore the connection isn't idle
anymore and keepalives might not be used causing the connection to
stay open and the client to stall.
Linux 2.6.36 added a TCP_USER_TIMEOUT TCP socket option that lets a
program specify the maximum time transmitted data may remain
unacknowledged before TCP will close the corresponding connection with
ETIMEDOUT.
Setting TCP_USER_TIMEOUT allows us to detect a network problem (like
cable disconnect) even if the connection isn't idle.
2015-02-20 13:22:01 +01:00
Marc-André Moreau
44d06888bb
libfreerdp-core: fix BIO leaks
2015-02-18 15:36:57 -05:00
Marc-André Moreau
991f7b347d
libfreerdp-core: further abstract multiple connections used internally by tsg from rdpTransport
2015-02-15 10:06:17 -05:00
Marc-André Moreau
edfc5120b7
libfreerdp-core: replace rdpTcp by BufferedSocket BIO
2015-02-14 10:14:13 -05:00
Marc-André Moreau
e904195e49
libfreerdp-core: more rdpTcp refactoring
2015-02-13 16:51:08 -05:00
Marc-André Moreau
e241330daf
libfreerdp-core: rewrite tls_write_all to use front BIO only
2015-02-13 16:02:37 -05:00
Marc-André Moreau
c001a69d50
libfreerdp-core: move wait_read/wait_write operations under BIO layer
2015-02-13 15:22:27 -05:00
Marc-André Moreau
b7a619ff8a
libfreerdp-core: move some rdpTcp operations under BIO layer
2015-02-13 14:26:02 -05:00
Marc-André Moreau
69b93c322d
libfreerdp-core: fix transport crash, reduce rdpTcp usage
2015-02-13 09:27:54 -05:00
Marc-André Moreau
aa8b843250
libfreerdp-core: move stuff down from transport to tsg layer
2015-02-11 11:57:02 -05:00
Marc-André Moreau
46724b0c75
libfreerdp-core: fix tsg crash on disconnect
2015-02-11 10:57:14 -05:00
Marc-André Moreau
a4979456e5
Merge branch 'master' of github.com:FreeRDP/FreeRDP into gateway
2015-02-04 11:36:05 -05:00
Petr Sumbera
b09d865d5c
Better to use HAVE_SYS_FILIO_H when we already have it.
2015-02-03 13:29:35 -08:00
Petr Sumbera
7fee867447
Added ifdef to previous commit.
2015-02-02 10:59:51 -08:00
Petr Sumbera
17df42e4b5
Fixes some build issues on Solaris 11.
2015-02-02 08:48:54 -08:00
Marc-André Moreau
5cdc464933
libfreerdp-core: warn but do not fail in freerdp_tcp_set_keep_alive_mode
2015-01-30 11:34:09 -05:00
Marc-André Moreau
ef71181897
libfreerdp-core: fix Win32 gateway authentication
2015-01-29 14:07:02 -05:00
Marc-André Moreau
b387708069
libfreerdp-core: fix Win32 socket event handle
2015-01-29 11:35:52 -05:00
Marc-André Moreau
bb67968141
libfreerdp-core: cleanup transport debug output
2015-01-28 15:37:20 -05:00
Marc-André Moreau
a9df86ab16
libfreerdp-core: update gateway code for Windows
2015-01-28 14:54:03 -05:00
Marc-André Moreau
5bf8b1509e
libfreerdp-core: improve socket BIO handling
2015-01-28 13:46:17 -05:00
Marc-André Moreau
32a991c165
libfreerdp-core: move socket event and nonblock options to socket BIO
2015-01-27 21:18:26 -05:00
Marc-André Moreau
b552aa9363
libfreerdp-core: add support for multiple redirection target addresses
2014-12-27 18:53:27 -05:00
Marc-André Moreau
772a0aaf0c
libfreerdp-core: fix TCP connection timeout (non-Windows)
2014-12-27 16:48:32 -05:00
Marc-André Moreau
6c2ebb2b58
channels: redirection valgrind fixes
2014-12-27 13:50:50 -05:00
Marc-André Moreau
9dd77ae14a
libfreerdp-core: add usage of TargetNetAddresses in ip-based redirection when hostname resolution fails
2014-12-26 13:49:25 -05:00
Mario Lombardo
3c634f91db
Rename tcp-functions as they are conflicting with qemu functions
2014-11-29 21:14:39 +01:00
Armin Novak
8d4589b1e1
Replaced fprintf error messages with WLog.
2014-11-16 12:21:38 +01:00
Marc-André Moreau
ddedc574f3
freerdp: remove tcp, uds utils
2014-11-12 14:06:34 -05:00
Mehul Dhorda
256eab682b
Added SIGPIPE handling for iOS.
2014-11-10 11:52:29 -08:00
Bernhard Miklautz
4dcc0957f1
Fix build on windows
...
Problem was introduces by a non pull request push for ipv6 support
2014-10-22 12:16:40 +02:00
Jean-Louis Dupond
0dc0e01568
Add ipv6 client support
2014-10-17 12:08:39 +02:00
Armin Novak
2f519d7f16
Replaced logging in libfreerdp with wlog defines.
2014-09-15 08:48:46 +02:00
Marc-André Moreau
e4a4aa4d3a
Merge branch 'master' of github.com:awakecoding/FreeRDP into shadow
...
Conflicts:
channels/encomsp/client/encomsp_main.c
libfreerdp/core/tcp.c
libfreerdp/crypto/certificate.c
server/Windows/CMakeLists.txt
server/X11/xf_cursor.c
server/X11/xf_input.c
server/X11/xf_interface.c
server/X11/xf_monitors.c
server/X11/xf_peer.c
2014-08-11 19:22:33 -04:00
Armin Novak
bcb5f90ee6
Replaced perror with DEBUG_WARN
2014-08-11 09:19:23 +02:00
Armin Novak
f4c133eaf8
Replaced custom logging mechanism with WLog wrapper.
2014-08-07 16:51:24 +02:00
Marc-André Moreau
9838200068
libfreerdp-core: fix unix domain socket support
2014-08-06 12:08:00 -04:00
Marc-André Moreau
3895c930a3
Merge branch 'master' of github.com:awakecoding/FreeRDP into shadow
2014-08-05 09:56:12 -04:00
Bernhard Miklautz
8c318da7b1
fix compiler warnings
2014-07-29 05:22:29 +02:00
Marc-André Moreau
d8b858811f
shadow: initial windows server-side connectivity
2014-07-17 21:15:22 -04:00
Bernhard Miklautz
c99d4648ff
Merge pull request #1950 from hardening/kill_select
...
kill the last remaining select() in libfreerdp
2014-07-11 16:41:31 +02:00
Hardening
3fce288c66
Fix unclean SSL disconnection
...
This patch prevent an infinite loop when the remote peer disconnect
the socket without cleanly closing the SSL connection.
2014-07-10 23:35:11 +02:00
Hardening
6223460557
kill the last remaining select() in libfreerdp
2014-07-09 11:28:41 +02:00
Hardening
542811291c
Use poll() instead of select() when available
...
select() has the major drawback that it cannot handle file descriptor
that are bigger than 1024. This patch makes use of poll() instead of
select() when poll() support is available.
2014-07-03 15:26:49 +02:00
Marc-André Moreau
04968b18c4
libfreerdp-core: replace all OpenSSL built-in BIOs by new full duplex BIOs
2014-06-01 21:37:20 -04:00
Marc-André Moreau
a8be174e03
libfreerdp-core: remove ineffective full duplex locks
2014-06-01 11:20:13 -04:00
Marc-André Moreau
c5e4c74bb6
libfreerdp-core: fix build on Windows
2014-05-30 15:29:06 -04:00
Marc-André Moreau
b1416af362
libfreerdp-core: add locks to disable full duplex BIOs (currently unsafe)
2014-05-30 14:53:10 -04:00
Marc-André Moreau
709df9aecc
libfreerdp-core: add connection timeout, fix gateway bypass local
2014-05-30 14:03:20 -04:00
Marc-André Moreau
629858b676
libfreerdp-core: add gateway-usage-method command line option, avoid resetting BIO flags we shouldn't reset
2014-05-30 12:31:26 -04:00
Marc-André Moreau
e8d3164f99
libfreerdp-core: fix windows build warning
2014-05-22 16:08:10 -04:00
Marc-André Moreau
b24c95ce59
libfreerdp-core: fix tcp_new on Windows
2014-05-22 15:13:00 -04:00
Hardening
3200baca4b
Correctly export ringbuffer function and fix a warning
2014-05-21 22:20:38 +02:00
Hardening
dd6d829550
Allow transport_write calls to be non-blocking
...
This big patch allows to have non-blocking writes. To achieve
this, it slightly changes the way transport is handled. The misc transport
layers are handled with OpenSSL BIOs. In the chain we insert a
bufferedBIO that will bufferize write calls that couldn't be honored.
For an access with Tls security the BIO chain would look like this:
FreeRdp Code ===> SSL bio ===> buffered BIO ===> socket BIO
The buffered BIO will store bytes that couldn't be send because of
blocking write calls.
This patch also rework TSG so that it would look like this in the
case of SSL security with TSG:
(TSG in)
> SSL BIO => buffered BIO ==> socket BIO
/
FreeRdp => SSL BIO => TSG BIO
\
> SSL BIO => buffered BIO ==> socket BIO
(TSG out)
So from the FreeRDP point of view sending something is only BIO_writing
on the frontBio (last BIO on the left).
2014-05-21 17:42:31 +02:00
Hobby-Student
03315cebe8
FreeBSD compile errors
2014-05-01 15:09:35 +02:00
Benoît LeBlanc
3581d27f08
tcp: (Mac OS X) added setsockopt(SOL_SOCKET, SO_NOSIGPIPE) to prevent the application crashing on a broken socket.
2014-04-10 16:26:44 -04:00
Marc-André Moreau
3782c2ad72
Merge branch 'master' of github.com:FreeRDP/FreeRDP
2014-01-25 16:34:34 -05:00
Mike McDonald
a563362ea2
Changed #define for SOL_TCP to be IPPROTO_TCP instead of 6
2014-01-21 11:06:29 -05:00
Mike McDonald
c0d26443ce
Added #define for SOL_TCP to fix compilation error on iOS
2014-01-21 08:27:21 -05:00
Mike McDonald
c4f6dcc24f
Added auto reconnect to FreeRDP core and X11 client
2014-01-16 17:38:56 -05:00
Marc-André Moreau
5536033a8a
libfreerdp-core: transport refactoring
2013-11-07 17:37:58 -05:00
Marc-André Moreau
61f95fbe16
libfreerdp-core: transport code style cleanup
2013-11-07 15:14:59 -05:00
Marc-André Moreau
3caff4e460
libfreerdp-core: prevent multi-session crashes on Mac OS X
2013-11-01 20:23:56 -04:00
Marc-André Moreau
1fc2d780f7
libfreerdp-core: fix memory leaks reported by valgrind
2013-10-31 23:35:24 -04:00
Marc-André Moreau
c058095251
libfreerdp-core: cleanup TS Gateway code
2013-10-11 05:07:33 -04:00
Marc-André Moreau
1fab70504f
libfreerdp-core: properly attach tcp event handle for peers
2013-07-20 22:34:05 -04:00
Vic Lee
8a1b59a127
libfreerdp-core/tcp: add a null pointer check.
2013-05-14 16:24:43 +08:00
Marc-André Moreau
e88b59c32c
libfreerdp-core: improve async-transport mode
2013-04-30 17:16:38 -04:00
Hardening
7701c9d934
Replace printf(...) by fprintf(stderr, ...)
2013-03-28 23:06:34 +01:00
Marc-André Moreau
8c8a82c31f
libfreerdp-utils: purge old STREAM utils
2013-03-21 16:45:25 -04:00
Vic Lee
ed5ad30d4f
libfreerdp-core/transport: select sockfd instead of sleep when blocking.
2012-12-21 16:24:26 +08:00
Marc-André Moreau
6cdb09740c
wfreerdp: fix build
2012-12-14 13:11:07 -05:00
Marc-André Moreau
2045a5aec8
libfreerdp-utils: remove print utils
2012-12-14 00:30:20 -05:00
Marc-André Moreau
8a32de3801
libfreerdp: purged source tree from deprecated memory utils
2012-11-21 21:22:06 -05:00
Marc-André Moreau
b2c3ca8cc4
libfreerdp-utils: replace all calls to deprecated function xzalloc
2012-11-21 19:22:41 -05:00
Marc-André Moreau
8544716104
libfreerdp-core: rdpSettings refactoring (part 3)
2012-11-07 18:23:33 -05:00
Marc-André Moreau
6427c9dd90
libfreerdp-core: rdpSettings refactoring (part 2)
2012-11-07 15:13:14 -05:00
Marc-André Moreau
9d064171a7
freerdp: get rid of old types
2012-10-09 03:26:39 -04:00
Marc-André Moreau
1bf8a45519
freerdp: change uint8, sint8, uint16, sint16 to BYTE, INT8, UINT16, INT16
2012-10-09 03:01:37 -04:00
Marc-André Moreau
1ed644786c
freerdp: change boolean type to BOOL type
2012-10-09 02:38:39 -04:00
Marc-André Moreau
5612bc43f8
freerdp: change true/false to TRUE/FALSE
2012-10-09 02:31:28 -04:00
Marc-André Moreau
2df7aaad39
libfreerdp-utils: get rid of xstrdup in favor of WinPR _strdup
2012-10-08 23:42:01 -04:00
Marc-André Moreau
9909a12af5
libfreerdp-utils: get rid of xmalloc, xrealloc and xfree
2012-10-08 23:21:26 -04:00
Marc-André Moreau
e60a092d81
freerdp: fix headers
2012-10-08 23:02:04 -04:00
Marc-André Moreau
d5d1eb7762
libfreerdp: add proper config.h inclusions
2012-08-14 17:09:01 -04:00
Marc-André Moreau
19028a27b0
libfreerdp: move all libraries to libfreerdp directory, one step closer to monolithic build option
2012-08-13 23:19:51 -04:00