Compare commits

...

3 Commits

6 changed files with 7 additions and 2 deletions

View File

@ -832,7 +832,7 @@ lockCallback(StreamIoStatus status)
case StreamIoSuccess:
break;
case StreamIoTimeout:
debug("%s: length, within %ld ms, device seems to be busy\n",
debug("%s: Cannot lock device within %ld ms, device seems to be busy\n",
name(), lockTimeout);
flags &= ~BusOwner;
finishProtocol(LockTimeout);

View File

@ -180,6 +180,7 @@ public:
#ifndef EPICS_3_13
extern "C" {
epicsExportAddress(int, streamDebug);
epicsExportAddress(int, streamError);
}
#endif

View File

@ -23,6 +23,7 @@
#include <stdio.h>
int streamDebug = 0;
int streamError = 0;
extern "C" {
#ifdef _WIN32
__declspec(dllexport)
@ -74,6 +75,7 @@ void StreamError(int line, const char* file, const char* fmt, ...)
void StreamVError(int line, const char* file, const char* fmt, va_list args)
{
char timestamp[40];
if (!streamError) return; // Error logging disabled
StreamPrintTimestampFunction(timestamp, 40);
#ifdef va_copy
if (StreamDebugFile)

View File

@ -28,6 +28,7 @@
#endif
extern int streamDebug;
extern int streamError;
extern void (*StreamPrintTimestampFunction)(char* buffer, int size);
void StreamError(int line, const char* file, const char* fmt, ...)

View File

@ -23,7 +23,7 @@
#define STREAM_MAJOR 2
#define STREAM_MINOR 7
#define STREAM_PATCHLEVEL 7
#define STREAM_PATCHLEVEL 8
#if defined(__vxworks) || defined(vxWorks)
#include <vxWorks.h>

View File

@ -2,6 +2,7 @@ if (@ARGV[0] == "-3.13") {
shift;
} else {
print "variable(streamDebug, int)\n";
print "variable(streamError, int)\n";
print "registrar(streamRegistrar)\n";
}
print "driver(stream)\n";