aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/src/Loop.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Fix parsing ports set to unix sockets"Mike Gabriel2019-02-201-5/+1
| | | | | | This reverts commit 889de46f759913742478d2cfe20f1f4a6c2effdc. Fixes ArcticaProject/nx-libs#775.
* Fix parsing ports set to unix socketsVadim2019-01-221-1/+5
|
* nxcomp: fix spelling errors as reported by codespellUlrich Sibiller2018-05-241-4/+4
|
* Fix clang error: comparison of array authCookie not equal to a null pointer ↵Mario Trangoni2018-03-011-1/+1
| | | | is always true
* nxagent: Also provide auto DPI feature via nx/nx option 'autodpi', taking ↵Mike Gabriel2018-02-271-1/+2
| | | | only effect on session startups.
* nxcomp/src/Loop.cpp: Harmonize log output. Uniformly, embrace port values by ↵Mike Gabriel2018-02-271-6/+6
| | | | | | single quotes. Fixes ArcticaProject/nx-libs#617.
* nxcomp/src/Loop.cpp: Make know the agent option 'keyconv' to nxcomp and ↵Mike Gabriel2018-02-271-1/+2
| | | | | | tolerate it as a valid option. Fixes ArcticaProject/nx-libs#630.
* nxagent: Add support for optionally enabling/disabling the magic pixel feature.Mike Gabriel2018-02-261-1/+2
| | | | Fixes ArcticaProject/nx-libs#657.
* nxcomp/src/Loop.cpp: Typo fix in error msg.Mike Gabriel2018-01-201-1/+1
|
* nxcomp: drop strncpy in favour of snprintfUlrich Sibiller2017-12-291-24/+20
| | | | with very few exceptions which require careful thinking ;-)
* Loop.cpp: fix memleak happening with unknown tcp hostUlrich Sibiller2017-12-291-0/+1
| | | | | | | | | | | | | | | ==28424== 6 bytes in 1 blocks are definitely lost in loss record 1 of 7 ==28424== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==28424== by 0x541D4D9: strndup (strndup.c:43) ==28424== by 0x4E8AD4B: ChannelEndPoint::getTCPHostAndPort(char**, long*) const (ChannelEndPoint.cpp:311) ==28424== by 0x4EBE9CC: ConnectToRemote(ChannelEndPoint&) (Loop.cpp:6656) ==28424== by 0x4EB0A4C: SetupProxyConnection() (Loop.cpp:3205) ==28424== by 0x4EDC81A: handleNegotiationInLoop(int&, fd_set&, fd_set&, timeval&) (Loop.cpp:14308) ==28424== by 0x4EAE40F: NXTransPrepare (Loop.cpp:2576) ==28424== by 0x4EAA801: NXTransContinue (Loop.cpp:1610) ==28424== by 0x4EB50C9: WaitCleanup() (Loop.cpp:4436) ==28424== by 0x4EA9507: NXTransProxy (Loop.cpp:1235) ==28424== by 0x400B2A: main (Main.c:111)
* ChannelEndPoint.cpp: fix possible memleak in getUnixPath()Ulrich Sibiller2017-12-291-0/+1
|
* ChannelEndPoint.cpp: fix another memleakUlrich Sibiller2017-12-291-0/+2
| | | | | | | | | | | | | | | ==7689== 50 bytes in 5 blocks are definitely lost in loss record 1 of 2 ==7689== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==7689== by 0x54074D9: strndup (strndup.c:43) ==7689== by 0x4E7D803: ChannelEndPoint::getTCPHostAndPort(char**, long*) const (ChannelEndPoint.cpp:309) ==7689== by 0x4EC9D93: ConnectToRemote(ChannelEndPoint&) [clone .constprop.144] (Loop.cpp:6660) ==7689== by 0x4ECB94E: SetupProxyConnection() (Loop.cpp:3204) ==7689== by 0x4ECE824: handleNegotiationInLoop(int&, fd_set&, fd_set&, timeval&) [clone .isra.129] (Loop.cpp:14312) ==7689== by 0x4ED0F8A: NXTransPrepare (Loop.cpp:2575) ==7689== by 0x4ED1C35: NXTransContinue (Loop.cpp:1609) ==7689== by 0x4ED1D7B: WaitCleanup() (Loop.cpp:4440) ==7689== by 0x4ED2343: NXTransProxy (Loop.cpp:1234) ==7689== by 0x400B2A: main (Main.c:111)
* nxcomp: implement correct length handling for unix socket structsUlrich Sibiller2017-12-291-16/+51
| | | | (partially) fixes ArcticaProject/nx-libs#612
* Loop.cpp: drop ugly ifdef indentationUlrich Sibiller2017-12-291-9/+6
|
* Loop.cpp: create xServerAddrUNIX only if requiredUlrich Sibiller2017-12-291-4/+3
|
* Loop.cpp: improve/fix usage of s(n)printfUlrich Sibiller2017-12-291-4/+6
|
* Loop.cpp: some reformatting/simplification/FIXMEsUlrich Sibiller2017-12-291-5/+11
| | | | (partially) fixes ArcticaProject/nx-libs#612
* Loop.cpp: delete passed object prior to overwriting itUlrich Sibiller2017-12-291-1/+4
|
* ChannelEndPoint.cpp: re-scope/improve getSpecUlrich Sibiller2017-12-291-0/+2
|
* Loop.cpp: delete structs when no longer requiredUlrich Sibiller2017-12-291-0/+2
| | | | | | Fix another memleak (partially) fixes ArcticaProject/nx-libs#612
* Loop.cpp: always close testSocketFDUlrich Sibiller2017-12-291-1/+2
| | | | | | was missing in the non-abstract code path (partially) fixes ArcticaProject/nx-libs#612
* Loop.cpp: free display before leaving SetupDisplaySocket()Ulrich Sibiller2017-12-291-0/+5
| | | | fixes a memory leak
* Loop.cpp: Fix memset (size was 0)Ulrich Sibiller2017-12-291-1/+1
| | | | (partially) fixes ArcticaProject/nx-libs#612
* nxcomp/src/Loop.cpp: whitespace in log messages only.Mihai Moldovan2017-12-251-4/+4
|
* nxcomp/src/Loop.cpp: use new log continuation mechanism.Mihai Moldovan2017-12-251-18/+18
| | | | | | | | | | | Especially don't flush data out mid-append. Doing so will lead to the next append operation failing. Should fix messages queuing up indefinitely (until they are discarded at program termination, at least) and missing messages in general. Fixes: ArcticaProject/nx-libs#577 Fixes: ArcticaProject/nx-libs#611
* nxcomp/src/Loop.cpp: whitespace only.Mihai Moldovan2017-12-251-3/+3
|
* nxcomp/src/Loop.cpp: fix small memory leak.Mihai Moldovan2017-12-241-0/+2
|
* nxcomp/src/Loop.cpp: log message fixups only.Mihai Moldovan2017-12-181-2/+2
|
* nxcomp: fix shadow warningUlrich Sibiller2017-12-111-2/+2
| | | | | | | | | | | | | | Fixes this: CXX Loop.lo Loop.cpp: In function 'void handleCheckResultInLoop(int&, int&, int&, fd_set&, fd_set&, timeval&, timeval&)': Loop.cpp:14080:68: warning: declaration of 'startTs' shadows a global declaration [-Wshadow] struct timeval &startTs) ^ Loop.cpp:1020:13: note: shadowed declaration is here T_timestamp startTs; Fixes ArcticaProject/nx-libs#545
* nxcomp: use new macro SAFE_FREE(ptr)Ulrich Sibiller2017-12-091-20/+13
| | | | | 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 two memleaksUlrich Sibiller2017-12-091-4/+19
|
* nxcomp: use lowercase abbreviations for seconds and millisecondsUlrich Sibiller2017-12-021-30/+30
|
* 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
* nxcomp/src/Loop.cpp: hardcode X11 and (legacy/xfs) font UNIX paths.Mihai Moldovan2017-11-041-15/+7
| | | | | | | | Fixes: ArcticaProject/nx-libs#536 Allowing overrides via NX_TEMP and TEMP breaks system using pam_tmpdir.so and most server infrastructure expects the location to be fixed anyway.
* Regression fix for f855b3b6. Caused FTBFS with Loop.cpp:2669:0: error: ↵Mike Gabriel2017-10-271-1/+0
| | | | unterminated #ifdef (#ifdef TIME).
* nxcomp/src/Loop.cpp: fix whitespace errors on continued lines.Mihai Moldovan2017-10-271-810/+810
|
* Remove leading \n in NXTrans* loggingVadim Troshchinskiy2017-10-271-3/+3
|
* Fix whitespace and line splitting issues reported by ionicVadim Troshchinskiy2017-10-271-10/+19
|
* Conversion of Loop.cpp to the new log systemVadim Troshchinskiy2017-10-271-2560/+1285
|
* New logging implementationVadim Troshchinskiy2017-10-271-0/+97
| | | | | | | | Features: * Works without ifdefs * Configurable with commandline arguments * Log level configurable per file * Thread safe
* Fix bug #525: PANIC! No port specified for multimedia connectionsVadim Troshchinskiy2017-10-101-11/+13
| | | | | | | Commit 5f1eb0dc3eb89e84a3b146975e147b995fb7673f introduced a regression that made the use of the multimedia port mandatory. Fixes ArcticaProject/nx-libs#525
* nxcomp/src/Loop.cpp: Reduce control->TokenSize slightly again in order to ↵Simon Matter2017-10-091-2/+2
| | | | fix fragmentation of packages when on VPN (or otherwise encapsulated) connections.
* nxcomp/src/Loop.cpp: whitespace fixes only.Mihai Moldovan2017-09-291-6/+6
|
* Fix nxagent argument parsing logicVadim Troshchinskiy2017-09-291-57/+48
| | | | | | | | | This makes it so that slave=1 works again as it should. The changes introduced earlier resulted in the unintentional requirement to specify the actual port number, breaking backwards compatibility. Fixes: ArcticaProject/nx-libs#518
* nxcomp/src/{Loop,Proxy}.cpp: On Debian/kFreeBSD (and other *BSD variants) ↵Mike Gabriel2017-09-061-0/+8
| | | | | | the sockaddr_un.sun_path property is 104 chars long, not 108. Hard-coding Unix domain sockets in nxcomp the string length 104. Fixes ArcticaProject/nx-libs#507.
* nxcomp/src/Loop.cpp: Don't mix using global proxyFD and a local p(roxy)FD ↵Mike Gabriel2017-07-261-16/+16
| | | | variable (in WaitForRemote() and ConnectToRemote()). Rename local variable name.
* nxcomp/src/Loop.cpp: Don't use global variables as function paramters in ↵Mike Gabriel2017-07-261-4/+4
| | | | handleLogReopenInLoop().
* nxcomp/src/Loop.cpp: Drop global variable diffTs, declare it in every ↵Mike Gabriel2017-07-261-5/+2
| | | | funtion where it is needed.