Merge ~bhill/epics-base:camonitor-server-relative-ts-bug into ~epics-core/epics-base/+git/epics-base:3.16

Proposed by Bruce Hill
Status: Rejected
Rejected by: Ralph Lange
Proposed branch: ~bhill/epics-base:camonitor-server-relative-ts-bug
Merge into: ~epics-core/epics-base/+git/epics-base:3.16
Diff against target: 30 lines (+6/-6)
1 file modified
src/ca/client/tools/tool_lib.c (+6/-6)
Reviewer Review Type Date Requested Status
Ralph Lange Approve
Review via email: mp+341085@code.launchpad.net

Description of the change

tsFirst needs to get initialized from the first server side
timestamp instead of the client side tsNow.

Discovered when I added a -P option to show SLAC pulseId which is in the
lower 17 bits of nsec on the server side but is just nsec on the client side.

Tested and working here at SLAC since Nov 2017.

To post a comment you must log in.
Revision history for this message
Ralph Lange (ralph-lange) wrote :

Correctly found and fixed the bug.
Thanks a lot!

Should be re-targeted to 3.14 branch.

review: Approve
Revision history for this message
Ralph Lange (ralph-lange) wrote :

3.14 re-targeting should probably be done on a new branch/merge proposal.

Revision history for this message
Ralph Lange (ralph-lange) wrote :

Unmerged commits

f7b1c40... by Bruce Hill

Fixed camonitor server side relative timestamps bug

tsFirst needs to get initialized from the first server side
timestamp instead of the client side tsNow.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/ca/client/tools/tool_lib.c b/src/ca/client/tools/tool_lib.c
2index 72044bd..29b252e 100644
3--- a/src/ca/client/tools/tool_lib.c
4+++ b/src/ca/client/tools/tool_lib.c
5@@ -414,6 +414,12 @@ char *dbr2str (const void *value, unsigned type)
6 ptsNewS = &((struct TYPE *)value)->stamp; \
7 ptsNewC = &tsNow; \
8 \
9+ if (!tsInitS) \
10+ { \
11+ tsFirst = *ptsNewS; \
12+ tsInitS = 1; \
13+ } \
14+ \
15 switch (tsType) { \
16 case relative: \
17 ptsRefC = &tsStart; \
18@@ -506,12 +512,6 @@ void print_time_val_sts (pv* pv, unsigned long reqElems)
19 epicsTimeGetCurrent(&tsNow);
20 epicsTimeToStrftime(timeText, TIMETEXTLEN, timeFormatStr, &tsNow);
21
22- if (!tsInitS)
23- {
24- tsFirst = tsNow;
25- tsInitS = 1;
26- }
27-
28 if (pv->nElems <= 1 && fieldSeparator == ' ') printf("%-30s", pv->name);
29 else printf("%s", pv->name);
30 printf("%c", fieldSeparator);

Subscribers

People subscribed via source and target branches