Commit Graph

256 Commits

Author SHA1 Message Date
akallabeth
1319c08bba Cleaned up use of rdpSettings in channels 2022-03-28 15:52:32 +02:00
Armin Novak
ce63397323 Move drdynvc main path messages to trace level
They are noisy and hide more important information from debug log
2022-03-08 16:15:18 +01:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
Martin Fleisz
8d49175a94 Revert "drdynvc: Prevent opening an already opened dynamic channel"
This reverts commit feda57a739.
2022-02-23 17:18:50 +01:00
akallabeth
8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Martin Fleisz
7adf2f0bbd drdynvc: Prevent opening an already opened dynamic channel 2021-12-03 09:57:09 +01:00
Armin Novak
95ecc6929a Refactored channel error handling
* Fix WINPR_ASSERT if a client can not allocate new resources,
  terminated cleanly instead.
* Add WINPR_ASSERT for lots of channel arguments
2021-09-09 08:53:20 +02:00
Armin Novak
4e44003832 Expose dynamic channel PDU types 2021-09-09 08:53:20 +02:00
Armin Novak
054f0ea260 Use defines instad of channel names 2021-08-25 10:54:24 +02:00
Armin Novak
ccfe0c129e Removed checks already done by WINPR_ASSERT 2021-06-16 11:46:42 +02:00
Armin Novak
d6c84c28fb Renamed ArrayList_Add to ArrayList_Append
* Do not break API silently
2021-06-16 11:46:42 +02:00
Armin Novak
a1c8e4cf85 Refactored ArrayList_Add to conform to other functions 2021-06-16 11:46:42 +02:00
sss
6b76ac9545 Revert "Revert "allow to use in single threaded mode" (#6864)"
This reverts commit f7465af44f.
2021-03-26 11:50:45 +01:00
akallabeth
f7465af44f
Revert "allow to use in single threaded mode" (#6864)
This reverts commit bee2e1526d.
2021-03-05 13:02:38 +01:00
Gluzskiy Alexandr
bee2e1526d allow to use in single threaded mode
(some client side channels and all server side channels still need to be
ported to new api)

server: build fix, do not disable threads for rfx encoder

cliprdr client channel: implemented support for DisableThreads option
looks like thread does not make sense at all for this channel

do not initialize disabled image codecs (respect settings)

channels: client: rail: added support for DisableThreads setting

changed "BOOL DisableThreads" to "UINT32 ThreadingFlags"
dropped unnecessary apu changes

draft implementation of threading settings aware message handling api
for addins/channels

rail: use new messaging api

fixed memory leak

msgs handlers external api changes (as requested)

msgs_handlers: init fix

fixed memory leak

logic fix

resolved problems appeared after rebase to master, dropped unnecessary
changes

git clang-format origin/master

fixed TestFreeRDPCodecRemoteFX.c

"formatting, run `clang-format` please"

properly use new "rfx_context_new(BOOL, UINT32)" everywhere

passed Threading Flags to "rfx_context_new" where available

in older C standarts veriables declaration must be done before any code

requested changes

clang-format as requested

use broken signatures of standert C functions for m$ s**tos

clang-format

requested changes

requested changes

moved ThreadingFlags to stable api zone

define type for channel msg handler

typo fix

clang-format

build fix

us ThreadingFlags from server settings

git clang-format origin/master

clang-format
2021-02-25 14:05:40 +01:00
akallabeth
e2fd9db0b5 Added const to function arguments 2021-02-17 11:29:56 +01:00
akallabeth
66dc4cc9ee Fixed compilation warnings. 2020-11-10 08:53:43 +01:00
akallabeth
7f1cca78aa Clean up drdynvc channels porperly locked. 2020-11-06 13:38:47 +01:00
akallabeth
6e3c00725a Cleaned up collections:
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
Armin Novak
81d59b2d47 Fixed double free on channel close in channel write. 2020-08-12 10:10:18 +02:00
Armin Novak
57b405ca26 Fixed compilation warnings. 2020-08-10 12:14:11 +02:00
akallabeth
1a02af5a12 Fixed codition with side effects 2020-06-22 11:51:38 +02:00
Kubistika
6ed765c960 drdynvc: client: fix #6252 use-after-free 2020-06-03 19:47:40 +03:00
akallabeth
cac8c365f2 Reset pointer to NULL after free. 2020-05-20 15:10:08 +02:00
akallabeth
a1eb3e66b3 Clear dynamic channel lists on disconnect. 2020-05-20 15:10:08 +02:00
akallabeth
abf7c29910 Extend lifetime of streampool in drdynvc
The stream pool can not be released until all streams have been
returned. This might happen as late as channel termination, so
change the lifetime scope accordingly.
2020-05-18 16:57:02 +02:00
akallabeth
6a811db69c Fixed drdynvc_send stream release 2020-05-13 17:11:17 +02:00
akallabeth
64ad42b95b Fixed DestroyListener arguments and call order 2020-05-13 17:11:17 +02:00
akallabeth
5b2a4434d8 drdynvc channel cleanup.
* Clean channel listeners on channel close
* Remove limit on listeners for channels
* Remove limit on channels
2020-05-12 11:40:42 +02:00
akallabeth
c31eb24bae Fixed wrong error return from drdynvc_write_data
When the channel was closed a wrong error code was returned.
2020-05-08 11:21:51 +02:00
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