Commit Graph

225 Commits

Author SHA1 Message Date
Armin Novak
4692f00864 Removed unnecessary cast. 2020-03-09 16:40:07 +01:00
Armin Novak
1fd51d9183 Fixed clang scanbuild warnings. 2020-03-04 09:17:35 +01:00
Norbert Federa
17e0d25104 dynvc/client: fix and improve channel closing code
- fixed and consolitate the duplicated code for sending the
  CLOSE_REQUEST_PDU to the server into dvcman_close_channel
- call dvcman_close_channel if a dynamic channel plugin fails
  to process the received channel data
- rdpegfx: don't try to remove a non-existing cache entry,
  return an error instead which now will close the channel, as
  expected by Microsoft's windows protocols test suite
2020-03-04 08:03:56 +01:00
Armin Novak
f933cafa93 Added some callbacks to dynamic channel
* Allow listener removal of channel during runtime
* Allow retrieval of channel name
2020-02-18 11:14:05 +01:00
Martin Fleisz
e304428a5f
Merge pull request #5857 from akallabeth/scanbuild_fixes
Scanbuild fixes
2020-02-12 10:16:54 +01:00
Armin Novak
d2aef75004 Fix #5852: handle CHANNEL_EVENT_WRITE_CANCELLED
When channels are cleaned up OpenHandle is most of the time
already 0. Ignore the argument checks for
CHANNEL_EVENT_WRITE_CANCELLED and CHANNEL_EVENT_WRITE_COMPLETE
only check where actually required (CHANNEL_EVENT_DATA_RECEIVED)
2020-01-29 08:52:25 +01:00
Armin Novak
087f290d8d Fixed type of index variable. 2020-01-23 10:12:12 +01:00
Armin Novak
7011b008b5 Ignore dynamic virtual channel errors
If a dynamic virtual channel can not process a message, ignore it.
2020-01-13 12:23:30 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
75ed12f1f0 Fixed userdata pointer and CHANNEL_EVENT_WRITE_CANCELLED message. 2019-11-06 13:01:43 +01:00
Armin Novak
1bcb799560 Listen to CHANNEL_EVENT_WRITE_CANCELLED and emit if queue is cleared. 2019-11-06 13:01:43 +01:00
Armin Novak
1b78b59926 Fixed #4809: Properly process CHANNEL_EVENT_WRITE_COMPLETE 2019-11-06 13:01:43 +01:00
Armin Novak
0bba166020 Force close channel, use defines instead of magic numbers
* When senging a close request for a dynamic channel close the channel
  immediately. A response from the server is not guaranteed.
* Use the *_PDU defines instead of magic numbers when creating
  dynamic channel messages.
2019-02-26 15:29:30 +01:00
Armin Novak
711c726222 Fixed static analyzer warnings for dynamic channel. 2019-01-29 12:07:05 +01:00
Ilya Shipitsin
bdc039e719 resolve several issues found by cppcheck
[client/X11/xf_floatbar.c:800] -> [client/X11/xf_floatbar.c:796]: (warning) Either the condition '!floatbar' is redundant or there is possible null pointer dereference: floatbar.
[client/X11/xf_floatbar.c:800] -> [client/X11/xf_floatbar.c:797]: (warning) Either the condition '!floatbar' is redundant or there is possible null pointer dereference: floatbar.
[client/X11/xf_floatbar.c:800] -> [client/X11/xf_floatbar.c:798]: (warning) Either the condition '!floatbar' is redundant or there is possible null pointer dereference: floatbar.
[libfreerdp/codec/dsp.c:1156] -> [libfreerdp/codec/dsp.c:1154]: (warning) Either the condition '!srcFormat' is redundant or there is possible null pointer dereference: srcFormat.
[channels/drdynvc/client/drdynvc_main.c:1453] -> [channels/drdynvc/client/drdynvc_main.c:1450]: (warning) Either the condition '!drdynvc' is redundant or there is possible null pointer dereference: drdynvc.
[channels/audin/client/opensles/audin_opensl_es.c:98] -> [channels/audin/client/opensles/audin_opensl_es.c:94]: (warning) Either the condition '!opensles' is redundant or there is possible null pointer dereference: opensles.
[channels/audin/client/opensles/audin_opensl_es.c:159] -> [channels/audin/client/opensles/audin_opensl_es.c:153]: (warning) Either the condition '!opensles' is redundant or there is possible null pointer dereference: opensles.
2019-01-02 20:35:24 +05:00
Armin Novak
a8a6accc15 Fixed compiler warnings. 2018-10-03 15:16:59 +02:00
Armin Novak
baee520e3d Fix for #4866: Added additional length checks 2018-09-20 09:06:01 +02:00
Armin Novak
114abad767 Removed use of strcpy. 2018-08-27 14:34:09 +02:00
Armin Novak
a716dc244c Removed duplicate resource free. 2018-06-18 10:23:57 +02:00
Armin Novak
973a4c30b8 Fixed channel duplicate disconnect handling 2018-04-09 11:26:26 +02:00
Armin Novak
2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Martin Fleisz
ffa5fb07c2 drdynvc: Fix possible NULL pointer accesses 2018-03-06 16:03:13 +01:00
Armin Novak
a6a57e3619 Prefer dynamic logger in dynamic channel. 2018-02-13 13:46:25 +01:00
David Fort
73eb4ba77e drdynvc: fixed stream leak on error 2018-02-13 10:51:45 +01:00
Armin Novak
1ec1c9b7a3 Add dynamic channel queue object free function. 2018-02-09 11:04:31 +01:00
David Fort
41823080f9 Fix users of Stream_GetPosition() that returns size_t 2017-12-11 22:38:58 +01:00
David Fort
1e48405d19 drdynvc: fix invalid check
There were a copy'n paste error in the check of a malloc.
2017-12-01 14:20:24 +01:00
Armin Novak
8a5c78bde6 Unified dynamic channel cleanup code. 2017-08-31 09:55:59 +02:00
Armin Novak
523a881663 Channels with a context must free it themselves. 2017-07-28 08:39:51 +02:00
Armin Novak
8b9e3fa51e Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
Armin Novak
359077e8d3 Closing dynamic channels on shutdown. 2017-02-15 15:42:14 +01:00
Armin Novak
a64fb343c1 Fixed missing return. 2017-01-18 15:41:50 +01:00
Armin Novak
7f1d4222eb Checks, return value fixes
* Added missing argument checks
* Use opened drdynvc->log where possible
* Fix drdynvc_send return in case channel not connected.
2017-01-17 16:06:17 +01:00
Armin Novak
9f19da798c Added attach/detach support for channels. 2016-12-19 17:07:01 +01:00
Norbert Federa
f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Bernhard Miklautz
00dae7c5ef Fix some spelling errors
Fixes #3633
2016-12-01 15:36:49 +01:00
Norbert Federa
c6e6b44143 countless WLog/printf format specifier fixes 2016-11-25 17:06:25 +01:00
Martin Haimberger
7fe28a8a78 virtualChannel: removed static variable usage from
VirtualChannelApi
2016-11-23 04:17:56 -08:00
Marc-André Moreau
36db0cc325 channels: properly handle VirtualChannelEntryEx in static virtual channel loading 2016-11-16 09:52:24 -05:00
Marc-André Moreau
f74380be42 channels/drdynvc: fix channel entry point name 2016-11-15 12:37:50 -05:00
Marc-André Moreau
dee76617d9 channels: remove thread-local storage usage 2016-11-15 11:41:01 -05:00
Marc-André Moreau
2cce8e9fbc channels: migrate drdynvc to extended virtual channel API 2016-11-15 10:58:38 -05:00
Marc-André Moreau
70c4646722 channels: restore global tables for initHandle, openHandle mappings instead of thread local storage 2016-11-14 15:23:05 -05:00
Marc-André Moreau
e8004d5184 drdynvc: ignore some messages sent for invalid channel ids with MMR and Windows Server 2012 R2, fix issue #3422 2016-11-03 10:12:48 -04:00
Armin Novak
5bc691c79d Improved error handling if channel is missing. 2016-10-27 14:41:05 +02:00
Armin Novak
9f5da483dc Reformatted files touched in last 2 commits. 2016-10-06 13:43:12 +02:00
Armin Novak
64590e7e89 Set pEntryPointsEx->ppInterface NULL on error. 2016-10-06 13:43:12 +02:00
Armin Novak
88a3b8dd76 Initializing channel context in each thread. 2016-10-06 13:43:12 +02:00
Armin Novak
dadc5262ae Removed static channel variables.
Global static variables do not work, if more than one instance
of an RDP client is running in the same process space.
Removed the varaibles where possible and replaced them with
thread local storage where necessary.
2016-10-06 13:43:09 +02:00
Armin Novak
dc12641b23 Fixed a windows 8.1 issue. 2016-10-06 13:43:01 +02:00