Commit Graph

42 Commits

Author SHA1 Message Date
Michael Davidsaver
f827bd7e34 true is C23 keyword 2025-04-15 16:10:34 -07:00
Freddie Akeroyd
5dfc6caf3c Accept should return SOCKET rather than int 2024-03-06 09:48:26 -06:00
Michael Davidsaver
1595ed8860 quieting clang-tidy, non-functional changes
Changes to syntax which should not effect generated code
2023-08-28 14:17:00 +02:00
Ralph Lange
38c99df2e0 libCom: fix possible memory leaks in iocLogServer.c
found by static code analysis (cppcheck @ sonarqube)
2023-07-22 08:35:59 -07:00
Andrew Johnson
550e902bf3 iocLogPrefix: skip "already set" warning if prefix identical 2023-01-19 11:00:14 -06:00
Elaine Chandler
30d4a583d0 add doxygen comments for logClient 2022-07-04 16:27:48 -05:00
Torsten Bögershausen
420fb45fbc Fix several compilation errors for -DDEBUG
After Adding "-DDEBUG" to the compiler options some files don't
compile any more.
Fix the compilation errors.
2021-09-01 11:13:40 +02:00
Michael Davidsaver
e34b6c5c0c Fix spelling in comments
Should be non-functional, except for some error message strings.
2021-08-29 07:27:50 -07:00
JJL772
32d76623f2 Fix potential memory leak on error
In osdThread.c for POSIX if pthread_create_key fails
In iocLogServer.c if fdmgr_init returns NULL
In dbBkpt.c if semaphore creation fails while adding a bp to a lockset
In devSiSoftCallback.c if linked record is not found
2021-08-05 08:30:23 -07:00
Michael Davidsaver
315fb3df69 init scripts use FINAL_LOCATION 2021-05-19 09:02:21 -07:00
Andrew Johnson
3c99391d93 Added SPDX License ID to all EPICS-original source files
In some cases the license-identification header was missing,
so I added that as well. Replaced the remaining headers that
specifically identified "Versions 3.13.7 and higher".

Makefiles and the build system were deliberately excluded.
2020-08-03 11:53:01 -05:00
36a8b51d8e CleanupWhitespace
removed spaces at end of line

replaced tabs with spaces
2020-05-20 14:48:09 -07:00
Michael Davidsaver
799e72b1e3 libCom: actually use libComAPI.h in libCom 2020-05-20 14:47:51 -07:00
Andrew Johnson
85d1982890 Merge changes from 3.15 branch into 7.0 2020-04-15 21:39:54 -05:00
Michael Davidsaver
76b9461ee8 logClient windows needs SOCK_E* 2019-11-12 19:07:30 -08:00
Michael Davidsaver
fc04d12578 Merge remote-tracking branch 'zimoch/iocLogClientFixesTry2' into 7.0
* zimoch/iocLogClientFixesTry2: (22 commits)
  use EPICS_PRIVATE_API macro and fix bug with darwin/ios
  renamed epicsSocketCountUnsentBytes to epicsSocketUnsentCount and moved it to osi/os/
  fix bug from commit f85454. Apparently epicsExportSharedSymbols is needed even though epicsExport.h is included
  epicsSocketCountUnsentBytes returns -1 on failure
  bugfix: memmove'ed to much
  epicsSockCountUnsentBytes renamed to epicsSocketCountUnsentBytes
  moved logClientSendMessage and made it static
  fix wrong function name in comment
  sending 0 bytes helps to detect broken connections on some systems (but is undefined behavior on Linux, fails on vxWorks and is a documented no-op on Windows)
  cannot print sockets with %d in Windows, they are not small ints but maybe pointers.
  ask logClient socket how many bytes are still in the send queue and don't discard them in case the connection turns out broken.
  use dynamic debug flag for logClient
  increase error message buffer size for long (Windows) error messges
  improve logClientShow to show unsent bytes on level 2 (and fix level 1)
  removed unneeded include
  no need to delay startup only because log server is currently not available
  send pending log messages directly after connecting
  avoid needless memmove calls
  elimitate duplicate code in logClient
  do not discard unsent messages when log server has closed connection, instead try to send them after reconnect
  ...
2019-10-24 10:22:07 -07:00
Freddie Akeroyd
edc66418ac WIN32: Add symbol lookup 2019-10-17 20:10:23 -07:00
4bb81654d6 use EPICS_PRIVATE_API macro and fix bug with darwin/ios 2019-10-04 14:32:07 +02:00
46912d5516 renamed epicsSocketCountUnsentBytes to epicsSocketUnsentCount and moved it to osi/os/ 2019-09-23 11:10:32 +02:00
cf121f1c14 fix bug from commit f85454. Apparently epicsExportSharedSymbols is needed even though epicsExport.h is included 2019-09-23 10:54:17 +02:00
1718647121 epicsSocketCountUnsentBytes returns -1 on failure 2019-09-19 12:08:45 +02:00
752ec12261 bugfix: memmove'ed to much 2019-09-19 11:42:04 +02:00
e28bb3b0e2 epicsSockCountUnsentBytes renamed to epicsSocketCountUnsentBytes 2019-09-19 10:48:14 +02:00
64f540a64f moved logClientSendMessage and made it static 2019-09-19 10:44:36 +02:00
db3b160f4e fix wrong function name in comment 2019-09-19 08:54:19 +02:00
c9b670977d sending 0 bytes helps to detect broken connections on some systems (but is undefined behavior on Linux, fails on vxWorks and is a documented no-op on Windows) 2019-09-18 09:58:28 +02:00
931054d4fd cannot print sockets with %d in Windows, they are not small ints but maybe pointers. 2019-09-17 17:45:33 +02:00
6ffc9e17da ask logClient socket how many bytes are still in the send queue and don't discard them in case the connection turns out broken. 2019-09-17 17:34:16 +02:00
f85454a8d6 use dynamic debug flag for logClient 2019-09-17 17:12:58 +02:00
26f6f674be increase error message buffer size for long (Windows) error messges 2019-09-17 14:41:35 +02:00
d162337b9a improve logClientShow to show unsent bytes on level 2 (and fix level 1) 2019-09-17 14:39:03 +02:00
49bf8bb5ec removed unneeded include 2019-09-17 11:59:02 +02:00
2b0161d9bf no need to delay startup only because log server is currently not available 2019-08-30 08:57:08 +02:00
9df98c1838 send pending log messages directly after connecting 2019-08-30 08:57:08 +02:00
59aa9cfe74 avoid needless memmove calls 2019-08-30 08:57:08 +02:00
709208ef5c elimitate duplicate code in logClient 2019-08-30 08:57:08 +02:00
0a3427c835 do not discard unsent messages when log server has closed connection, instead try to send them after reconnect 2019-08-30 08:57:08 +02:00
2432878773 speed up logRestart thread termination at exit 2019-08-30 08:57:08 +02:00
62c3b0a585 don't send errlog on all logClients 2019-08-30 08:57:08 +02:00
Andrew Johnson
59cffd51ae Merge 3.15 branch into 7.0 2019-07-25 18:10:40 -05:00
Andrew Johnson
2efe56c6d1 Merge 3.16 (after 3.16.2-rc1) into 7.0 2018-10-26 17:04:53 -05:00
Ralph Lange
833648c977 Move all under modules/libcom 2018-06-19 11:25:46 +02:00