Commit Graph

1102 Commits

Author SHA1 Message Date
Oksana Ivashkevych
6f6ab3b758 codeathon 2022 Added doxygen formatting to initHooks.h 2022-09-05 21:58:34 -05:00
Oksana Ivashkevych
59d16c56a1 codeathon 2022. Added missing comments with \brief, updated other notation for consistency 2022-09-05 21:58:34 -05:00
Oksana Ivashkevych
58edb984c9 codeathone 2022, added doxygen syntax to all comments in dbChannel.h 2022-09-05 21:58:34 -05:00
Oksana Ivashkevych
eb3207ee21 Codeathon 2022 Header annotations project dbChannel.h 2022-09-05 21:58:34 -05:00
Andrew Johnson
efc7cbaf7f Build system fixes related to INSTALL_LOCATION
* The build can't descend into external submodules when there is no
configure/RULES_TOP file present in $(INSTALL_LOCATION).
* Recreate modules/RELEASE.<host>.local if configure/CONFIG_SITE or
configure/CONFIG_SITE.local have changed.
* Move the distclean of modules/RELEASE.<host>.local to RULES_TOP
* Several comment and white-space changes
2022-09-03 10:47:58 -05:00
Torsten Bögershausen
a8e8d22c31 iocinf.cpp: Hostnames may be longer than 32 bytes
Found here at ESS:

(all in one line)
EPICS_CA_ADDR_LIST=averylonghostname.mylabnetwork.technicalnetwork.example.com
EPICS_CA_AUTO_ADDR_LIST=NO
caget somePVnam

leads to something like this:
CA.Client.Exception...............................................
    Warning: "Empty PV search address list"
    Source File: ../udpiiu.cpp line 403
    Current Time: Thu Jun 09 2022 10:10:47.804161447

Problem desription:
addAddrToChannelAccessAddressList() will collect what ever we specify in
EPICS_CA_ADDR_LIST for channel access.
That function will add IP-addresses to the search list.
hostnames are possible, but are ignored if longer than 32 bytes,
because buf is too short.

If a hostname can be resolved into an IP, that is fine,
if not that is "fine as well" (better say: silently ignored):
If, and only if, EPICS_CA_AUTO_ADDR_LIST=NO is given then the one
and only too long hostname will be ignored and lead to an
"Empty PV search address list".

If EPICS_CA_AUTO_ADDR_LIST=YES (or nothing) is specified, the search list
is not empty, and EPICS will search all broadcast addresses.
This will eventually lead into a timout.

Solution:
Increase the buf size in addAddrToChannelAccessAddressList() from 32 to 256

The maximum length for a hostname is 255:
https://www.ietf.org/rfc/rfc1034.txt

If we add one byte for the string terminating '\0', we need 256 bytes.

And yes, this patch neglets the fact that a user can specify HOSTNAME:PORT,
which may need another 6 bytes. To put it the other way around:
In this case the hostname length is limited to 250 bytes,
which is still long enough in practice.
2022-09-02 18:28:34 -07:00
c2df1c6fe5 string waveform init test added 2022-09-02 08:33:32 -07:00
c5a7548526 eliminated unnecessary code 2022-09-02 08:33:32 -07:00
dc70dfd625 escape non-printable chars in dbgf output of CHAR arrays 2022-09-02 08:33:32 -07:00
20e20cbf2b improved JSON parser error messages 2022-09-02 08:33:32 -07:00
2e44ca586f using the same error printing function consistently 2022-09-02 08:33:32 -07:00
c9619d013a printing some context 2022-09-02 08:33:32 -07:00
ec650e8c3f allow empty array input links 2022-09-02 08:33:32 -07:00
Michael Davidsaver
d47fa4caa4 fix aSub with constant input links 2022-09-02 08:09:51 -07:00
Michael Davidsaver
f0369058bb dbReadCOM missing newline in error 2022-09-02 08:08:27 -07:00
Andrew Johnson
df96c0170a Minor changes to makeBaseApp templates 2022-08-30 14:06:30 -05:00
Andrew Johnson
1fa98d489f Merge Pierrick's VersionHeaderDate branch into 7.0 2022-08-23 11:54:07 -05:00
Andrew Johnson
5cef60a3e4 Clear unused var warning 2022-08-21 16:51:17 -05:00
Andrew Johnson
20fb6b9ef5 Merge 3.15 changes into 7.0 2022-08-21 16:44:38 -05:00
Michael Davidsaver
e28c914966 dbDumpRecordType show field offset/size 2022-08-20 13:53:03 -07:00
Michael Davidsaver
6feaaebd75 test epicsStrtok_r 2022-08-20 11:47:41 -07:00
Andrew Johnson
5d92d406a1 Darwin: Resolve soft-links in epicsGetExecName() 2022-08-18 12:17:06 -05:00
Andrew Johnson
ad1a13730a Remove unused var 2022-08-16 15:08:23 -05:00
Andrew Johnson
a24a84c315 Replace errPrintf() in recGbl.c 2022-08-16 15:07:49 -05:00
Andrew Johnson
6e7a715380 Getting .DTYP from rectype with no devSup now returns '' 2022-08-16 13:33:11 -05:00
Andrew Johnson
b88b35d117 Enhancements to the capr.pl script 2022-08-16 11:58:35 -05:00
Andrew Johnson
0a20825c6e NTPTimeSync: Show when NTP sync failed, recovered 2022-08-15 19:12:05 -05:00
Michael Davidsaver
13bd6bac5f Com: rewrite errlog
Switch to double buffering to allow errlogThread
to unlock while printing.

Conflicts:
	modules/libcom/src/error/errlog.c
2022-08-03 09:18:20 +02:00
Michael Davidsaver
424d678abf linkTest_registerRecordDeviceDriver() fix return type 2022-07-29 07:45:23 -07:00
Andrew Johnson
752ca97f7e VxWorks: Stop VxWorks clock sync if EPICS_TS_FORCE_NTPTIME
Use ipcom_ipd_kill() to do it properly, announce when doing it.
Suspending the ipsntps task is dangerous, can hang the OS so
don't try to kill it if user already suspended the task.
Also drops checks for the "ipntpd" thread, not used.
2022-07-28 13:11:59 -07:00
Andrew Johnson
bf0b4d2f61 VxWorks: Re-run tz2timezone() whenever the year increases
In the event that it then goes backwards we won't run it again; that
should never happen, but if it did we should prefer stability!
2022-07-28 13:11:59 -07:00
Andrew Johnson
87d5c01853 Set useNTP if VxWorks sync task is suspended
Also report that state instead of "running".
2022-07-28 13:11:59 -07:00
Andrew Johnson
956af730a9 osiClockTime.c: Clarify message wording
Distinguish between IOC's clock sync thread and OS's one.
Show our sync interval even when not synchronized.
Only mention the clock sync thread where there can be one.
2022-07-28 13:11:59 -07:00
Andrew Johnson
32564b1a94 osiClockTime.c: Move some things around
Group the private variables, note which are mutex-protected.
Reset the sync interval to 1 second if sync is restarted.
Initialize the syncFromPriority variable.
2022-07-28 13:11:59 -07:00
Andrew Johnson
5b690d5467 VxWorks: Pass interest level into osdClockReport 2022-07-28 13:11:59 -07:00
Andrew Johnson
9efebb6d3d osiClock: Register ClockTime_Init with iocsh
ClockTime_Init and ClockTime_Shutdown are only on VxWorks & RTEMS.
Adjust help text to match.
ClockTime_Init can be re-run later to start or stop the sync thread.
2022-07-28 13:11:59 -07:00
Andrew Johnson
1df973b234 VxWorks: Provide osdClockReport() for OS clock sync tasks. 2022-07-28 13:11:59 -07:00
Andrew Johnson
c71ebd1221 VxWorks: Set timezone when using OS own time-sync tasks 2022-07-28 13:11:59 -07:00
Andrew Johnson
167807f0c4 Rename OS Clock provider on macOS, uses a different implementation. 2022-07-28 13:11:59 -07:00
Jure Varlec
e6b8ecd55e Add space to the message printed by errMessage() 2022-07-28 13:11:29 -07:00
Michael Davidsaver
9048aa3438 db: move db_field_log dtor out of union 2022-07-28 13:10:59 -07:00
Bruce Hill
5ba8080f6e Fix undef ts on first camonitor update of NORD
Moves db_post_events() calls for NORD to process() function
after it updates the timestamp.
2022-07-28 13:09:27 -07:00
efd9e7908a allow arrays of strings in CHAR wf and lsi (concatenating) 2022-07-28 12:22:06 +02:00
96fe9306c7 fix JSON errors when reading empty array links 2022-07-27 09:58:09 +02:00
0caa5a045c fix for commit 5e076e6 2022-07-27 09:55:24 +02:00
Andrew Johnson
d82ab819ef Cap5 support for zero-length long strings 2022-07-13 13:24:54 -05:00
Andrew Johnson
5f02bad3fc Fix decimate filter for testing on VxWorks
Also adds checks to all filter tests to abort if they
can't continue because their filter wasn't registered.
2022-07-08 15:55:14 -05:00
Christian Roehrig
05311e0c94 Added Doxygen annotations to modules/libcom/src/iocsh/iocsh.h 2022-07-04 20:45:51 -05:00
Brendan Chandler
9864f79d67 Update doxygen for ipAddrToAsciiAsynchronous 2022-07-04 20:28:43 -05:00
Brendan Chandler
91800787ed Doxygen support for ipAddrToAsciiAsynchronous.h 2022-07-04 20:28:43 -05:00