Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | EncodeBuffer.cpp: add VALGRIND guard | Ulrich Sibiller | 2017-12-29 | 1 | -0/+7 |
| | | | | | | | Same as in WriteBuffer.cpp Valgrind will complain about uninitialized data, but we are only writing to the memory here. | ||||
* | nxcomp: implement correct length handling for unix socket structs | Ulrich Sibiller | 2017-12-29 | 2 | -28/+57 |
| | | | | (partially) fixes ArcticaProject/nx-libs#612 | ||||
* | Loop.cpp: drop ugly ifdef indentation | Ulrich Sibiller | 2017-12-29 | 1 | -9/+6 |
| | |||||
* | Loop.cpp: create xServerAddrUNIX only if required | Ulrich Sibiller | 2017-12-29 | 1 | -4/+3 |
| | |||||
* | Loop.cpp: improve/fix usage of s(n)printf | Ulrich Sibiller | 2017-12-29 | 1 | -4/+6 |
| | |||||
* | Loop.cpp: some reformatting/simplification/FIXMEs | Ulrich Sibiller | 2017-12-29 | 1 | -5/+11 |
| | | | | (partially) fixes ArcticaProject/nx-libs#612 | ||||
* | Loop.cpp: delete passed object prior to overwriting it | Ulrich Sibiller | 2017-12-29 | 1 | -1/+4 |
| | |||||
* | ChannelEndPoint.cpp: re-scope/improve getSpec | Ulrich Sibiller | 2017-12-29 | 2 | -9/+21 |
| | |||||
* | Loop.cpp: delete structs when no longer required | Ulrich Sibiller | 2017-12-29 | 1 | -0/+2 |
| | | | | | | Fix another memleak (partially) fixes ArcticaProject/nx-libs#612 | ||||
* | Loop.cpp: always close testSocketFD | Ulrich Sibiller | 2017-12-29 | 1 | -1/+2 |
| | | | | | | was missing in the non-abstract code path (partially) fixes ArcticaProject/nx-libs#612 | ||||
* | Loop.cpp: free display before leaving SetupDisplaySocket() | Ulrich Sibiller | 2017-12-29 | 1 | -0/+5 |
| | | | | fixes a memory leak | ||||
* | Loop.cpp: Fix memset (size was 0) | Ulrich Sibiller | 2017-12-29 | 1 | -1/+1 |
| | | | | (partially) fixes ArcticaProject/nx-libs#612 | ||||
* | nxcomp/src/Log.h: take a reference-type in generic has_newline() function. | Mihai Moldovan | 2017-12-27 | 1 | -1/+1 |
| | | | | Should avoid copy-constructing objects again. | ||||
* | nxcomp/src/Log.cpp: don't confuse users with useless warning messages in ↵ | Mihai Moldovan | 2017-12-27 | 1 | -8/+12 |
| | | | | case that a log line append operation was requested, but the message level has lower precedence than the current log filter. | ||||
* | nxcomp/src/Log.h: make sure we don't pass NULL pointers to strstr(). | Mihai Moldovan | 2017-12-27 | 1 | -1/+8 |
| | |||||
* | nxcomp/src/Loop.cpp: whitespace in log messages only. | Mihai Moldovan | 2017-12-25 | 1 | -4/+4 |
| | |||||
* | nxcomp/src/Loop.cpp: use new log continuation mechanism. | Mihai Moldovan | 2017-12-25 | 1 | -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 Moldovan | 2017-12-25 | 1 | -3/+3 |
| | |||||
* | nxcomp/src/Log.{cpp,h}: provide infrastructure for appending to already ↵ | Mihai Moldovan | 2017-12-25 | 2 | -23/+89 |
| | | | | | | | | | existing log lines. Also handle errors due to missing buffers gracefully. This error is surprisingly easy to trigger, so we should make sure that the program does not crash. | ||||
* | nxcomp/src/Log.h: NXLogStamp constructor should actually take a size_t-typed ↵ | Mihai Moldovan | 2017-12-25 | 1 | -1/+1 |
| | | | | line parameter. | ||||
* | nxcomp/src/Log.h: use initializer lists instead of initializing member ↵ | Mihai Moldovan | 2017-12-25 | 1 | -17/+4 |
| | | | | variables in-block. | ||||
* | nxcomp/src/ChannelEndPoint.cpp: don't use C-style casting in C++ code... | Mihai Moldovan | 2017-12-24 | 1 | -3/+3 |
| | |||||
* | nxcomp/src/Loop.cpp: fix small memory leak. | Mihai Moldovan | 2017-12-24 | 1 | -0/+2 |
| | |||||
* | nxcomp/src/Loop.cpp: log message fixups only. | Mihai Moldovan | 2017-12-18 | 1 | -2/+2 |
| | |||||
* | nxcomp/src/Log.cpp: only create a new queue entry if we actually intend to ↵ | Mihai Moldovan | 2017-12-11 | 1 | -3/+3 |
| | | | | | | write it out later. Fixes: ArcticaProject/nx-libs#596 | ||||
* | nxcomp: fix shadow warning | Ulrich Sibiller | 2017-12-11 | 1 | -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 Sibiller | 2017-12-09 | 4 | -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 leaks | Ulrich Sibiller | 2017-12-09 | 1 | -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 memleaks | Ulrich Sibiller | 2017-12-09 | 1 | -4/+19 |
| | |||||
* | ChannelEndPoint.cpp: fix two memleaks | Ulrich Sibiller | 2017-12-09 | 1 | -4/+10 |
| | |||||
* | nxcomp: simplify free calls | Ulrich Sibiller | 2017-12-09 | 1 | -3/+3 |
| | | | | free() can handle NULL itself | ||||
* | nxcomp: fix double free | Ulrich Sibiller | 2017-12-09 | 1 | -0/+2 |
| | | | | Fixes ArcticaProject/nx-libs#569 | ||||
* | nxproxy/nxcomp: document logging options | Ulrich Sibiller | 2017-12-07 | 1 | -0/+14 |
| | |||||
* | nxcomp/nxproxy: slightly improve the usage message of nxproxy | Ulrich Sibiller | 2017-12-07 | 1 | -6/+8 |
| | |||||
* | nxcomp/nxproxy: add missing hint for keyconv option | Ulrich Sibiller | 2017-12-07 | 1 | -0/+1 |
| | |||||
* | nxcomp: use lowercase abbreviations for seconds and milliseconds | Ulrich Sibiller | 2017-12-02 | 9 | -71/+71 |
| | |||||
* | nxcomp: remove unused return values | Ulrich Sibiller | 2017-12-02 | 1 | -19/+12 |
| | | | | Some functions' return values are never used anywhere, so drop them. | ||||
* | nxcomp: Fix setting of global tcpFD | Ulrich Sibiller | 2017-12-02 | 1 | -1/+2 |
| | | | | | | | This corrects a flaw that stayed undetected for 2.5 years, introduced via c5a2cf82f6baf7a9e64ec2328a5bac0dfee453ef Fixes ArcticaProject/nx-libs#573 | ||||
* | nxcomp/src/Misc.cpp: Update explanation for the NX_TEMP env variable. | Mike Gabriel | 2017-11-22 | 1 | -2/+1 |
| | |||||
* | nxcomp/src/Loop.cpp: hardcode X11 and (legacy/xfs) font UNIX paths. | Mihai Moldovan | 2017-11-04 | 1 | -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. | ||||
* | nxcomp/src/Auth.cpp: handle launchd sockets in DISPLAY variable correctly ↵ | Mihai Moldovan | 2017-11-03 | 1 | -3/+23 |
| | | | | when fetching X cookie. | ||||
* | Regression fix for f855b3b6. Caused FTBFS with Loop.cpp:2669:0: error: ↵ | Mike Gabriel | 2017-10-27 | 1 | -1/+0 |
| | | | | unterminated #ifdef (#ifdef TIME). | ||||
* | nxcomp/src/Loop.cpp: fix whitespace errors on continued lines. | Mihai Moldovan | 2017-10-27 | 1 | -810/+810 |
| | |||||
* | Remove leading \n in NXTrans* logging | Vadim Troshchinskiy | 2017-10-27 | 1 | -3/+3 |
| | |||||
* | Fix whitespace and line splitting issues reported by ionic | Vadim Troshchinskiy | 2017-10-27 | 1 | -10/+19 |
| | |||||
* | Conversion of Loop.cpp to the new log system | Vadim Troshchinskiy | 2017-10-27 | 1 | -2560/+1285 |
| | |||||
* | nxcomp/src/Log.h: prepare for logger testing application. | Mihai Moldovan | 2017-10-27 | 1 | -0/+4 |
| | | | | DO NOT USE! | ||||
* | nxcomp/src/Log.cpp: add PID to thread ID output if requested. | Mihai Moldovan | 2017-10-27 | 1 | -1/+2 |
| | | | | | | | | The default function we use (if a thread name is not specified explicitly) is pthread_self(). This function returns a number that is guaranteed to be unique for each thread within a process, but this assertion doesn't hold globally. Hence only using the thread ID is ambiguous when logging from multiple processes. | ||||
* | nxcomp/src/Log.h: block signals while writing out data. | Mihai Moldovan | 2017-10-27 | 1 | -0/+20 |
| | | | | | Prevents race conditions caused by signal handlers while flushing out our log queue. | ||||
* | nxcomp/src/Log.{cpp,h}: port to std::stack as internal buffer structure. | Mihai Moldovan | 2017-10-27 | 2 | -23/+37 |
| | | | | | | | | This has one drawback: after flushing log data to its underlying output, a new NXLogStamp object MUST be written to the NXLog object in order to create a new entry within the stack. This can be changed if necessary. For now I'd like to keep it as-is. |