Merge lp:~jontai/openvista-gtm-integration/bug526734 into lp:openvista-gtm-integration

Proposed by Jon Tai
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jontai/openvista-gtm-integration/bug526734
Merge into: lp:openvista-gtm-integration
Diff against target: 0 lines
To merge this branch: bzr merge lp:~jontai/openvista-gtm-integration/bug526734
Reviewer Review Type Date Requested Status Approve
Review via email:
To post a comment you must log in.
Revision history for this message (jeff-apple) :
review: Approve
123. By Jon Tai

Did a little more research into what was causing the "%GTM-E-IOEOF,Attempt to read past an end-of-file" error, but was unforunately unable to reproduce the error. Having the $ZEOF check in place was enough to stop the error from being logged at a customer site, though.

In the course of my research, I've found that there are other conditions that we're not handling, such as $D="1,Broken pipe". To that end, this commit changes the $D check to just look at the integer value instead of the 2nd comma-separated piece.

To screen out Cache, we check for $EC="", which is more behavior-based than explicitly checking for a named platform. Essentially, the logic is "if isn't set, check $D and $ZEOF as a last resort".

Jeff brought up a good point that we've introduced $ZEOF, which may not compile on systems that don't support $ZEOF, but both Cache and GT.M do, so I'll file a separate enhancement request for removing $ZEOF and replacing it to a call to a standardized OS-specific routine. EOF^ZISHGUX doesn't work because it expects $ZEOF (or $ZA) to be passed in, and STATUS^ZISHGUX contains an extra USE call that we probably don't want.

124. By Jon Tai

You can't $G($ZEOF) -- you get "Variable expected in this context" from the compiler. This causes the error trap to get invoked, and the error trap is set to "D UNWIND^%ZTER", which ignores the error and makes the interface go back into a listening state without logging an error, which is why we thought it was working.

Since $D seems to be set whenever $ZEOF is set, let's try removing the check for $ZEOF entirely and just check $D. The $EC check should prevent this check from being overly broad.

125. By Jon Tai

Too good to be true -- observed 3 instances where ERROR^HLCSTCP1 was invoked when $D=0 and $ZEOF=1. Add the $ZEOF check back in.

Preview Diff



People subscribed via source and target branches