summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shared/dlt_offline_trace.c4
-rw-r--r--src/shared/dlt_user_shared.c9
2 files changed, 9 insertions, 4 deletions
diff --git a/src/shared/dlt_offline_trace.c b/src/shared/dlt_offline_trace.c
index 1f6a5d5..2d70a77 100644
--- a/src/shared/dlt_offline_trace.c
+++ b/src/shared/dlt_offline_trace.c
@@ -396,7 +396,7 @@ DltReturnValue dlt_offline_trace_write(DltOfflineTrace *trace,
int size3)
{
- if (trace->ohandle <= 0)
+ if (trace->ohandle < 0)
return DLT_RETURN_ERROR;
/* check file size here */
@@ -440,7 +440,7 @@ DltReturnValue dlt_offline_trace_write(DltOfflineTrace *trace,
DltReturnValue dlt_offline_trace_free(DltOfflineTrace *trace)
{
- if (trace->ohandle <= 0)
+ if (trace->ohandle < 0)
return DLT_RETURN_ERROR;
/* close last used log file */
diff --git a/src/shared/dlt_user_shared.c b/src/shared/dlt_user_shared.c
index 857a6e9..732301c 100644
--- a/src/shared/dlt_user_shared.c
+++ b/src/shared/dlt_user_shared.c
@@ -108,7 +108,7 @@ DltReturnValue dlt_user_log_out2(int handle, void *ptr1, size_t len1, void *ptr2
struct iovec iov[2];
uint32_t bytes_written;
- if (handle <= 0)
+ if (handle < 0)
/* Invalid handle */
return DLT_RETURN_ERROR;
@@ -130,7 +130,7 @@ DltReturnValue dlt_user_log_out3(int handle, void *ptr1, size_t len1, void *ptr2
struct iovec iov[3];
uint32_t bytes_written;
- if (handle <= 0)
+ if (handle < 0)
/* Invalid handle */
return DLT_RETURN_ERROR;
@@ -145,6 +145,11 @@ DltReturnValue dlt_user_log_out3(int handle, void *ptr1, size_t len1, void *ptr2
if (bytes_written != (len1 + len2 + len3)) {
switch (errno) {
+ case ETIMEDOUT:
+ {
+ return DLT_RETURN_PIPE_ERROR; /* ETIMEDOUT - connect timeout */
+ break;
+ }
case EBADF:
{
return DLT_RETURN_PIPE_ERROR; /* EBADF - handle not open */