aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'Ionic-feature/backport-asprintf' into 3.6.xMike Gabriel2017-12-104-50/+330
|\ | | | | | | Attributes GH PR #592: https://github.com/ArcticaProject/nx-libs/pull/592
| * os/xprintf: add Xvscnprintf and XscnprintfDaniel Kurtz2017-12-102-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit 5c2e2a164d615ab06be28a663734e782614b5cc7 Author: Daniel Kurtz <djkurtz@chromium.org> Date: Wed Apr 18 09:51:51 2012 +0000 os/xprintf: add Xvscnprintf and Xscnprintf Normal snprintf() usually returns the number of bytes that would have been written into a buffer had the buffer been long enough. The scnprintf() variants return the actual number of bytes written, excluding the trailing '\0'. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Mihai Moldovan <ionic@ionic.de>
| * Typo in xserver Xvasprintf()Colin Harrison2017-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit 1324b0ca9f8a7fdaf03b374c75eb3c9df407c2f1 Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Dec 10 00:08:24 2010 +0000 Typo in xserver Xvasprintf() I needed this patch in the wrapper around vsnprintf() in os/xprintf.c (MinGW for Windows build) to correct various crashes. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Mihai Moldovan <ionic@ionic.de>
| * Add asprintf() implementation for platforms without itAlan Coopersmith2017-12-104-48/+272
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit c95c1d338fdb62dbe3dba934b97324fa778b7fce Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 18:43:12 2010 -0800 Add asprintf() implementation for platforms without it Provides a portable implementation of this common allocating sprintf() API found in many, but not yet all, of the platforms we support. If the platform provides vasprintf() we simply wrap it, otherwise we implement it - either way callers can use it regardless of platform. Since not all platforms guarantee to NULL out the return pointer on failure, we don't either, and require callers to check the return value for -1. The old Xprintf() API is deprecated, but left for compatibility for now. The new API is added in a new header so that it can be used in parts of the server such as hw/xfree86/parser that don't include all the server headers. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Includes re-indentation changes from 9838b7032ea9792bec21af424c53c07078636d21. Backported-to-NX-by: Mihai Moldovan <ionic@ionic.de>
* Merge branch 'uli42-pr/fix_memleaks' into 3.6.xMihai Moldovan2017-12-095-26/+57
|\ | | | | | | | | | | | | Attributes GH PR #575: https://github.com/ArcticaProject/nx-libs/pull/575 Fixes: ArcticaProject/nx-libs#569 Fixes: ArcticaProject/nx-libs#573
| * nxcomp: use new macro SAFE_FREE(ptr)Ulrich Sibiller2017-12-094-39/+33
| | | | | | | | | | Should be used instead of free() calls and will clear the pointer after calling free(). This can prevent double-free or use-after-free errors.
| * Loop.cpp: fix more memory leaksUlrich Sibiller2017-12-091-1/+15
| | | | | | | | | | | | | | The thread specific stringstream objects on the stack need to be deleted, not just pop()ed. Fixes ArcticaProject/nx-libs#573 (partially)
| * Loop.cpp: fix two memleaksUlrich Sibiller2017-12-091-4/+19
| |
| * ChannelEndPoint.cpp: fix two memleaksUlrich Sibiller2017-12-091-4/+10
| |
| * nxcomp: simplify free callsUlrich Sibiller2017-12-091-3/+3
| | | | | | | | free() can handle NULL itself
| * nxcomp: fix double freeUlrich Sibiller2017-12-091-0/+2
|/ | | | Fixes ArcticaProject/nx-libs#569
* Merge branch 'uli42-pr/keep_co' into 3.6.xMihai Moldovan2017-12-092-0/+17
|\ | | | | | | Attributes GH PR #582: https://github.com/ArcticaProject/nx-libs/pull/582
| * Reintroduce -co as no-opUlrich Sibiller2017-12-072-0/+17
|/ | | | | | nxagent will abort if it encounters an unknown command line option. As we want 3.6 to be a drop-in replacement for 3.5 we cannot simply drop old options but must accept them as no-op.
* Merge branch 'uli42-p/xquerytree_leak' into 3.6.xMihai Moldovan2017-12-073-27/+28
|\ | | | | | | | | | | Attributes GH PR #588: https://github.com/ArcticaProject/nx-libs/pull/588 Fixes: ArcticaProject/nx-libs#585
| * Events.c: add ifdef around nxagentRemoteWindowsTreeUlrich Sibiller2017-12-071-0/+3
| | | | | | | | It is called only if DEBUG_TREE is defined.
| * Make sure XQueryTree results are freedUlrich Sibiller2017-12-073-22/+24
| | | | | | | | Fixes ArcticaProject/nx-libs#585
| * Events.c: drop unused variableUlrich Sibiller2017-12-071-3/+0
| |
| * Events.c: move variable to inner scopeUlrich Sibiller2017-12-071-2/+1
|/
* Merge branch 'uli42-pr/various_backports' into 3.6.xMihai Moldovan2017-12-0710-23/+15
|\ | | | | | | | | | | | | | | Attributes GH PR #581: https://github.com/ArcticaProject/nx-libs/pull/581 Fixes: ArcticaProject/nx-libs#558 Fixes: ArcticaProject/nx-libs#541 Fixes: ArcticaProject/nx-libs#542
| * DIX: XKB: Set xkbInfo to NULL as well as freeing itDaniel Stone2017-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit 512bac25ec0e980968b93a2ebe88bd89bf99b697 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Nov 6 14:52:03 2007 +0000 DIX: XKB: Set xkbInfo to NULL as well as freeing it (bug # 10639) XkbRemoveResourceClient wants to access xkbInfo if it exists, so make sure we NULL it after freeing it. It doesn't make much sense to move the RemoveResourceClient call first, as there's not much point in notifying clients while we're shutting the server down anyway. Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
| * Allow options to appear with other components.Daniel Stone2017-12-071-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | Backported from X.Org: commit 1cfa9f647e0241f4b9e56556b128d7bfd987eaca Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Feb 28 16:55:26 2006 +0000 Bug # 5216: Allow options to appear with other components. Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
| * devPrivates fixesLars Knoll2017-12-072-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from X.Org: commit 0693083335185ce05ee64546151f3fc43ce98575 Author: Lars Knoll <lars@trolltech.com> Date: Mon Mar 6 21:00:09 2006 +0000 render/picture.c Correctly initialize devPrivates variable in source only pictures to 0 miext/cw/cw.h Don't try to access devPrivates of source only pictures Backported-from-NX-by: Ulrich Sibiller <uli42@gmx.de>
| * Coverity # 337: Remove useless NULL check.Adam Jackson2017-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: Commit 6bb2dc02a7cffd6ed7dd28e88d584920a4150749 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:01:47 2006 +0000 Coverity # 337: Remove useless NULL check. Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
| * Coverity # 491: Check version number correctly.Adam Jackson2017-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit 72cc6307257fcbb800267464487bf918ee674328 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:32:05 2006 +0000 Coverity # 491: Check version number correctly. Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
| * Coverity # 487: Check version number correctly.Adam Jackson2017-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit 152090ce442e94de1ae920208a92931af6493c8c Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:33:12 2006 +0000 Coverity # 487: Check version number correctly. Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de> Fixes ArcticaProject/nx-libs#542
| * Coverity # 807: Fix a memory leak in XFixesExpandRegion.Adam Jackson2017-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit 5e106a71b9f8077216d41619402952b0005dd8a4 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:49:04 2006 +0000 Coverity # 807: Fix a memory leak in XFixesExpandRegion. Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de> Fixes ArcticaProject/nx-libs#541
| * randr: free crtc->outputs on destroyGiuseppe Bilotta2017-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit fc7fb5bbe1c8f787e53500b9a2ca4af815f310d1 Author: Giuseppe Bilotta giuseppe.bilotta@gmail.com Date: Thu Nov 9 10:21:21 2017 +0100 randr: free crtc->outputs on destroy Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de> Fixes ArcticaProject/nx-libs#558
| * randr: always realloc crtcs and outputsGiuseppe Bilotta2017-12-072-12/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit 16381d186e7c791031392ed8afcfd33009854e9e Author: Giuseppe Bilotta giuseppe.bilotta@gmail.com Date: Thu Nov 9 10:21:20 2017 +0100 randr: always realloc crtcs and outputs When the last crtc (resp. output) is destroyed, the rrScrPriv crtcs (resp. outputs) fields do not get cleared, which can lead to a situation where the private's numCrtcs (resp. numOutputs) field is zero, but the associated memory is still allocated. Just checking if numCrtcs (resp. numOutputs) is zero is thus not a good criteria to determine whetehr to use a realloc or a malloc. Since crtcs (resp. outputs) are NULL-initialized anyway, relying on numCrtcs (resp. numOutputs) is actually unnecessary, because reallocation of a NULL ptr is equivalent to a malloc anyway. Therefore, just use realloc() unconditionally, and ensure that the fields are properly initialized. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de> Fixes ArcticaProject/nx-libs#558
* Merge branch 'uli42-pr/improve_nxproxy_help' into 3.6.xMihai Moldovan2017-12-072-6/+51
|\ | | | | | | Attributes GH PR #578: https://github.com/ArcticaProject/nx-libs/pull/578
| * nxproxy/nxcomp: document logging optionsUlrich Sibiller2017-12-072-0/+42
| |
| * nxcomp/nxproxy: slightly improve the usage message of nxproxyUlrich Sibiller2017-12-071-6/+8
| |
| * nxcomp/nxproxy: add missing hint for keyconv optionUlrich Sibiller2017-12-071-0/+1
|/
* Merge branch 'sunweaver-pr/drop-bin-wrappers' into 3.6.xMihai Moldovan2017-12-068-95/+25
|\ | | | | | | | | | | | | Attributes GH PR #562: https://github.com/ArcticaProject/nx-libs/pull/562 Fixes: ArcticaProject/nx-libs#546 Fixes: ArcticaProject/nx-libs#547
| * Makefile: Quote '$@' in make calls with double quotes.Mike Gabriel2017-12-051-9/+9
| |
| * Makefile: Don't use DESTDIR in configure.Mike Gabriel2017-12-051-1/+1
| | | | | | | | Fixes ArcticaProject/nx-libs#547.
| * Drop bin wrappers for nxagent and nxproxy, directly install nxproxy and ↵Mike Gabriel2017-12-058-88/+18
|/ | | | | | nxagent to BINDIR. Fixes ArcticaProject/nx-libs#546.
* Merge branch 'uli42-pr/fix_global_tcpFD' into 3.6.xMike Gabriel2017-12-059-90/+84
|\ | | | | | | Attributes GH PR #579: https://github.com/ArcticaProject/nx-libs/pull/579
| * nxcomp: use lowercase abbreviations for seconds and millisecondsUlrich Sibiller2017-12-029-71/+71
| |
| * nxcomp: remove unused return valuesUlrich Sibiller2017-12-021-19/+12
| | | | | | | | Some functions' return values are never used anywhere, so drop them.
| * nxcomp: Fix setting of global tcpFDUlrich Sibiller2017-12-021-1/+2
|/ | | | | | | This corrects a flaw that stayed undetected for 2.5 years, introduced via c5a2cf82f6baf7a9e64ec2328a5bac0dfee453ef Fixes ArcticaProject/nx-libs#573
* Merge branch 'uli42-pr/nokeyconv' into 3.6.xMihai Moldovan2017-11-265-5/+72
|\ | | | | | | Attributes GH PR #556: https://github.com/ArcticaProject/nx-libs/pull/556
| * Keyboard.c: make nxagentKeycodeConversion a BooleanUlrich Sibiller2017-11-231-1/+1
| |
| * add option keyconv=(auto|on|off)Ulrich Sibiller2017-11-235-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | Adds a new option called "keyconv" to control keycode conversion. Before commit 2f2ade61a8823bad012737b2b388dcc168cccbbf keycode conversion was activated if the client was Linux and client side rules and/or model was "evdev". The only (and undocumented) way to disable that was providing a value different from "linux" for the "client" option (which had no other effect). The mentioned commit removed the dependency on Linux and so there was no way anymore to disable keycode conversion.
| * Keyboard.c: Use booleans for nxagentKeycodeConversionUlrich Sibiller2017-11-231-5/+5
|/
* nxcomp/src/Misc.cpp: Update explanation for the NX_TEMP env variable.Mike Gabriel2017-11-221-2/+1
|
* nxproxy.1 man page: Update explanation for NX_TEMP env variable.Mike Gabriel2017-11-221-2/+1
|
* Merge branch 'Ionic-bugfix/hardcode-socket-paths-in-libX11' into 3.6.xMike Gabriel2017-11-221-168/+0
|\ | | | | | | Attributes GH PR #563: https://github.com/ArcticaProject/nx-libs/pull/563
| * nx-X11/lib/include/xtrans/Xtranssock.c: drop UNIX path overrides as well.Mihai Moldovan2017-11-221-168/+0
|/ | | | | | | Was missed in GH PR #544: https://github.com/ArcticaProject/nx-libs/pull/544 Fixes: ArcticaProject/nx-libs#536
* Merge branch 'uli42-pr/simplify_free' into 3.6.xMike Gabriel2017-11-2113-185/+58
|\ | | | | | | Attributes GH PR #555: https://github.com/ArcticaProject/nx-libs/pull/555
| * Error.c: simply nxagentGetClientsPath()Ulrich Sibiller2017-11-211-31/+8
| | | | | | | | | | | | nxagentGetClientsPath() allocated and returned a string that was never used anywhere because it also fills the global variable with the same value.