Commit Graph

366 Commits

Author SHA1 Message Date
Pavel Roskin
a4e3952d65 Disable or remove dead code to prevent it from throwing warnings 2016-11-26 09:17:51 -08:00
Pavel Roskin
a547cc3784 Include needed files in chansrv_fuse.c, remove duplicate declarations 2016-11-26 09:17:51 -08:00
Pavel Roskin
bf39fed6e4 Fix misuse of NULL for arithmetic type 2016-11-26 09:17:51 -08:00
Pavel Roskin
4234ed278e Use FUSE_CFLAGS and FUSE_LIBS from pkg-config
Include <fuse_lowlevel.h>, not <fuse/fuse_lowlevel.h>, the include path
should be set up for that.

Don't define _FILE_OFFSET_BITS in one file, FUSE_CFLAGS would enable it
for the whole xrdp-chansrv build if needed.
2016-11-26 09:17:51 -08:00
Pavel Roskin
7fce469cbc Fix format warnings if FUSE is enabled 2016-11-21 17:51:20 +00:00
Jay Sorg
25fd585d55 chansrv: some fixes to log file path 2016-11-19 07:31:36 +00:00
metalefty
b89956d06e Merge pull request #485 from proski/code-standards
Code standards
2016-11-16 17:05:21 +09:00
Pavel Roskin
35b336272b Fix compilation with C++ 2016-11-15 22:40:06 -08:00
Pavel Roskin
16c3bbdb8d Remove all tabs in sources 2016-11-15 22:40:06 -08:00
Pavel Roskin
92423a466e Fix potential buffer overflow in strncat() invocation
strncat() will copy at most the specified number of characters and append
the null character on top of that. strlen() doesn't count the final null
character.
2016-11-15 22:38:21 -08:00
Koichiro IWAO
7d017482f6 chansrv: change chansrv log path to ${XDG_DATA_HOME}/xrdp
like Xorg's logfile is written to ${XDG_DATA_HOME}/xorg/Xorg.n.log.

If XDG_DATA_HOME is not defined, the log path will be
${HOME}/.local/share/xrdp.
2016-10-25 14:52:43 +09:00
Pavel Roskin
a370306f75 Get rid of EXTRA_LIBS, use variables with more specific names 2016-10-20 10:43:02 -07:00
Pavel Roskin
5c69f3cd57 Eliminate EXTRA_FLAGS, it's a poor name, use AM_LDFLAGS 2016-10-20 10:43:02 -07:00
Pavel Roskin
0422734fc7 Merge EXTRA_DEFINES and EXTRA_INCLUDES into AM_CPPFLAGS
AM_CPPFLAGS is a documented Automake variable for C preprocessor flags
that should not be overridden when compiling the package.

There is no need to have two additional variables that are ultimately
merged into AM_CPPFLAGS.

Their names are also confusing. EXTDA_DIST is a documented Automake
variable. Everything else that starts with "EXTRA" is not.
2016-10-20 10:43:02 -07:00
Pavel Roskin
a618d4f757 Don't use final newline in log calls, it's already appended 2016-10-17 08:54:07 -07:00
Koichiro IWAO
9f277e4445 chansrv: pathname also should be URL decoded
because 1st argument to clipboard_get_file() is given as URL encoded.
Decoding only filename is incomplete.

Without this fix, clipboard file doesn't work in case pathname
contains non-ASCII characters or non-alphanumeric ASCII characters.
2016-08-30 15:49:58 +09:00
jsorg71
8353baab3d Merge pull request #390 from proski/june21
Cleanups and C++ compatibility
2016-08-05 14:38:41 -07:00
Kentaro Hayashi
8f3fb2f7c8 chansrv: avoid chansrv SEGV when xinode is NULL
When xfuse_create_file_in_xrdp_fs is failed, it returns NULL.

Without this fix, xinode->size causes SEGV, so implementation is changed
to return -1 and check the return value in caller.
2016-07-21 16:02:21 +09:00
Jay Sorg
9ccbfb6985 chansrv: added mp3 compression from Speidy 2016-07-13 17:44:07 -07:00
Pavel Roskin
2c13ef5c6d Use enum logLevels consistently for log levels 2016-07-08 04:29:57 +00:00
Pavel Roskin
cbe413bd8b Fix return type of devredir_fuse_data_peek and devredir_fuse_data_dequeue 2016-07-08 04:29:56 +00:00
Pavel Roskin
d1efb0d5ba Fix signed to unsigned comparisons reported by g++ 6.1.0 2016-07-08 04:29:51 +00:00
Pavel Roskin
5829323ad8 Use g_new or g_new0 when C++ compiler would complain about implicit cast 2016-07-08 04:29:49 +00:00
Pavel Roskin
4b05bb2ebd Mark g_drdynvc_chan_id as extern in g_drdynvc_chan_id, it's in chansrv.c 2016-07-08 04:29:44 +00:00
Pavel Roskin
aaa89ad4e6 Use const unsigned for hex arrays
Some constants are too big for the signed type.
2016-07-08 04:29:43 +00:00
Pavel Roskin
aeeb3d2c2e Fix warnings detected by -Wwrite-strings 2016-07-08 04:29:42 +00:00
Pavel Roskin
77b380c0b5 Fix format warnings in log_message() calls 2016-06-21 16:30:16 -07:00
Pavel Roskin
1403652c72 Remove unused variable in devredir_cvt_from_unicode_len() 2016-05-06 18:58:16 -07:00
Pavel Roskin
f2d326cbed Remove unused variables from dev_redir_proc_query_dir_response() 2016-05-06 18:58:16 -07:00
Pavel Roskin
0dd0426e6f Check XGetWindowProperty() return code in clipboard_event_property_notify() 2016-05-06 18:31:03 -07:00
Pavel Roskin
72019d3611 Use better symbols to protect include files 2016-05-05 00:06:26 -07:00
Pavel Roskin
ca9cbcafc8 Typo fixes 2016-05-04 23:33:30 -07:00
Pavel Roskin
70f3d4c5e2 Fix warnings for unused variables read from byte streams 2016-04-23 00:18:38 -07:00
Pavel Roskin
0629b25d5f Fix warnings about unused variables and functions 2016-04-21 22:27:27 -07:00
Pavel Roskin
e65bd6b7d7 Fix more format warnings 2016-04-21 21:21:17 -07:00
Jay Sorg
7393579205 Don't attempt to intercept SIGKILL, it doesn't work on any OS 2016-03-14 16:33:49 -07:00
jsorg71
f53b3bb737 Merge pull request #326 from metalefty/pulseaudio-6.0
pulse: fix build pulseaudio 6.0 or higher
2016-02-23 23:19:59 -08:00
Pavel Roskin
59a5fb0ddb Move headers from EXTRA_DIST to sources, sort alphabetically
There should be no functional difference.
2016-02-21 23:06:48 -08:00
Koichiro IWAO
93f7bcb71b pulse: fix build pulseaudio 6.0 or higher
Discovered in #321.  The number of argument for pa_rtpoll_run have
been changed since 6.0.

>=6.0 : int pa_rtpoll_run(pa_rtpoll *f);
<6.0  : int pa_rtpoll_run(pa_rtpoll *f, bool wait);

Check pulseaudio version by PA_CHECK_VERSION macro introduced since
pulseaudio 0.9.16.  In case PA_CHECK_VERSION is not defined,
pa_rtpoll_run takes 2 arguments.
2016-02-18 00:45:33 +09:00
Pavel Roskin
92a6833e9b Fix typos 2016-02-13 20:41:07 -08:00
Pavel Roskin
81779ddb01 Use lowercase program names for syslog
Other programs typically use the same case as their execulables.
2016-02-13 18:14:42 -08:00
Pavel Roskin
ffc4efb9ce Don't ignore files known to git
That can cause unexpected behavior, especially with third party tools.
The ignored files will be lost if the source tree is re-imported to
another git repository, unless special care is taken.

Whitelist all non-generated makefiles.

To whitelist instfiles/pam.d/xrdp-sesman, add path to all generated
executables listed in the top-level .gitignore, sort .gitignore
alphabetically.

Add mkinstalldir, it's used by Automake on some systems.
2016-02-12 23:52:46 -08:00
Pavel Roskin
22e808a186 Add missing spaces in the strings that are split for line wrapping 2016-02-12 23:52:45 -08:00
Pavel Roskin
5b0dcfc8fe rail: fix declaration of rail_desktop_resize()
Arguments without a type default to int. The caller passes a pointer to
XEvent, so use that type.
2016-01-31 23:35:40 -08:00
Pavel Roskin
986fa94733 clipboard: undefine previously defined log level 2016-01-30 18:01:12 -08:00
Pavel Roskin
00e70a5c54 Use standard autotools means to detect X11
Use AC_PATH_XTRA to search for X11 in configure.ac. In Makefiles, add
X_CFLAGS to AM_CFLAGS for the source compilation. Add X_LIBS to LDFLAGS.
Add X_PRE_LIBS and X_EXTRA_LIBS to LDADD.

With this patch, X Windows system is correctly detected on Mac OS X.
2016-01-30 17:18:52 -08:00
Pavel Roskin
334eeb970a clipboard_file: include sys/time.h for struct timeval, needed on Mac OS X 2016-01-30 12:32:52 -08:00
Pavel Roskin
a452d8d36a Merge AM_CFLAGS and INCLUDES info AM_CPPFLAGS
AM_CPPFLAGS is for flags passed to the preprocessor, such as defines and
includes. AM_CFLAGS is for flags affecting the compiler, such as debug
and optimization settings.

INCLUDES is an obsolete name. Users can pass INCLUDES and break
compilation. AM_CPPFLAGS is more explicit that the flags come from
Automake and should not be overridden.
2016-01-29 22:45:00 -08:00
Pavel Roskin
964e860072 Run through codespell 2016-01-14 08:47:50 -08:00
Jay Sorg
ded462ab8e chansrv: fix some warnings 2015-12-29 13:28:15 -08:00
Jay Sorg
8261459707 chansrv: fix a crash in fuse 2015-12-26 17:22:27 -08:00
itamarjp
c5cac75593 add more missing files into extra_dist 2015-07-14 12:16:25 -03:00
itamarjp
960cc62a0e add missing files into extra_dist,
this is required when using make dist to generate a tarball
2015-07-14 11:35:33 -03:00
Jay Sorg
6c23b85593 add timeout to trans_get_wait_objs_rw 2015-07-13 01:10:48 -07:00
Koichiro IWAO
53ea01d51e fuse: use EIO instead of EREMOTEIO for BSDs
FreeBSD/OpenBSD/NetBSD and OS X don't have errno EREMOTEIO.
2015-03-18 03:18:39 +00:00
jsorg71
f9c848f3ca Merge pull request #225 from metalefty/chansrv-explicit-include
chansrv: explicit include in chansrv_fuse.c
2015-03-15 16:43:59 -07:00
Jay Sorg
9e310fbe06 clipboard file paste, don't add new line to last line 2015-03-13 12:58:31 -07:00
Koichiro IWAO
647c72b75b chansrv: explicit include in chansrv_fuse.c
chansrv_fuse.c includes chansrv_fuse.h even if XRDP_FUSE is not
defined. However, time_t is used in chansrv_fuse.h.  This causes
build failure on FreeBSD.
2015-03-13 09:15:28 +00:00
jsorg71
4f60b58b17 Merge pull request #212 from robertalks/devel
fix possible segfault in chansrv if DISPLAY is not set
2015-03-12 15:36:31 -07:00
Jay Sorg
4dd78c1b8e minor change in opus encoding 2015-01-27 16:32:38 -08:00
Robert Milasan
f59c925f8b fix possible segfault in chansrv if DISPLAY is not set 2015-01-20 13:33:37 +01:00
Jay Sorg
9c5c0660b2 chansrv: reset opus support on init 2015-01-10 00:50:46 -08:00
Jay Sorg
2f5b84b712 chansrv: added opus audio compression for playback 2015-01-09 23:31:28 -08:00
Jay Sorg
bff2009147 chansrv: change to 44100 recording, disconnect / reconnect fixes 2014-11-26 16:48:37 -08:00
speidy
c159505980 chansrv: fix for segfault issue in chansrv_common 2014-11-21 03:13:14 +02:00
Jay Sorg
f41a11d2c4 chansrv: some recording fixes 2014-11-02 22:47:51 -08:00
Jay Sorg
290bafe173 pulse: fix for recording delay 2014-11-02 20:45:14 -08:00
Laxmikant Rashinkar
a3e017cd58 restart listener when corresponding sound source/sink connections are closed 2014-10-18 11:22:24 -07:00
Laxmikant Rashinkar
122d8bc057 sound redirection: handle fragmented packets 2014-10-12 17:47:35 -07:00
Laxmikant Rashinkar
c0839cd6a5 when closing audio source, don't flush audio data if audio buffer is empty 2014-10-06 19:43:52 -07:00
Jay Sorg
d17c4a78fb chansrv: check for nil 2014-08-13 10:10:04 -07:00
Jay Sorg
9597e90b31 chansrv: allow multiple xrdpapi connections 2014-08-12 23:14:49 -07:00
Jay Sorg
8397055e8b move some hard code paths to defines in header 2014-08-06 13:21:01 -07:00
Jay Sorg
e4d054654f pulse sink: check for partial sends 2014-08-06 12:11:59 -07:00
Jay Sorg
2e17b70fcd chansrv: sound_send_wave_data changes 2014-08-06 12:10:27 -07:00
Laxmikant Rashinkar
2363bf8af3 coverity: fixed miscellaneous issues 2014-08-02 11:13:12 -07:00
Laxmikant Rashinkar
162becfe55 coverity: fixed unsigned compare against 0 2014-07-28 18:16:29 -07:00
Laxmikant Rashinkar
a9d7c13147 coverity: read from pointer after free 2014-07-27 14:11:02 -07:00
Laxmikant Rashinkar
5e537ebdfe coverity: explicit null dereferenced 2014-07-27 12:57:13 -07:00
Laxmikant Rashinkar
0311a82c0a coverity: copy into fixed sized buffer 2014-07-27 12:42:12 -07:00
Laxmikant Rashinkar
1c423dadf4 coverity: copy into fixed sized buffer 2014-07-26 16:33:36 -07:00
Laxmikant Rashinkar
fde7be5151 coverity: fixed issue argument cannot be negative 2014-07-23 19:07:38 -07:00
Laxmikant Rashinkar
0c63a8feb3 coverity: Dereference after null check 2014-07-20 16:36:33 -07:00
Laxmikant Rashinkar
a990287c46 coverity: fixed unchecked return value from library 2014-07-20 13:14:09 -07:00
Laxmikant Rashinkar
023c0b5bc1 coverity: fixed out of bounds read-write 2014-07-20 11:11:20 -07:00
Laxmikant Rashinkar
73578bc612 coverity: fixed unchecked return value 2014-07-19 13:06:25 -07:00
Laxmikant Rashinkar
3bb31876e7 coverity: fixed resolution leak issues 2014-07-19 11:56:00 -07:00
Jay Sorg
6d3af904d3 sesman: sound.c: no logic change, remove tabs and warning 2014-06-28 09:54:36 -07:00
speidy
cbc8317c6d chansrv: sound: prevent an infinite loop when the connection with pulse audio is closed improperly 2014-06-26 23:02:44 +03:00
Jay Sorg
c8e61a8042 chansrv: more remove simple sound 2014-06-07 20:22:07 -07:00
Jay Sorg
17bbecabd3 chansrv: remove simple sound and load pulse modules 2014-06-07 20:15:14 -07:00
Jay Sorg
944be3afa3 chansrv: some rail fixes from A8 2014-06-03 11:44:25 -07:00
Jay Sorg
d1ca03c9fb pcsc, add hexdump for debugging 2014-05-29 20:59:08 -07:00
Jay Sorg
d5ea23ed48 pcsc smartcard fixes form 64 bit from Ken 2014-05-29 20:45:48 -07:00
Idan Freiberg
42de994741 Merge pull request #122 from speidy/devel
Compilation fix for pulse source module + Merge some fixes from master branch
2014-04-28 07:07:40 +03:00
speidy
eda3a2db65 chansrv: sound: zero out ack flags when sound_send_close called, to
avoid deadloop when chunk is sent and not acked back by the client.
2014-04-28 00:24:20 +03:00
speidy
d7b49762fa pulseaudio: let module-xrdp-source compile on CentOS6 (PA 0.9.21) 2014-04-22 05:16:15 +03:00
speidy
e17d2375ea Merge branch 'master' of https://github.com/neutrinolabs/xrdp into devel 2014-04-22 04:23:49 +03:00
Jay Sorg
e65c237503 pulse: fix for build with pulseaudio 4.0+ 2014-04-21 00:38:08 -07:00
Jay Sorg
03a5914609 chansrv: make fuse mount directory configurable
Conflicts:

	sesman/sesman.ini
2014-04-19 17:14:34 -07:00