From 99d331e50a87c9448435b034656feb459379c029 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 11 Feb 2016 14:36:48 -0600 Subject: [PATCH] Print timestamp with bad UDP msg errors --- src/rsrv/cast_server.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/rsrv/cast_server.c b/src/rsrv/cast_server.c index 27cbea355..1f6f76ced 100644 --- a/src/rsrv/cast_server.c +++ b/src/rsrv/cast_server.c @@ -274,19 +274,27 @@ void cast_server(void *pParm) if(prsrv_cast_client->recv.cnt != prsrv_cast_client->recv.stk){ char buf[40]; - + ipAddrToDottedIP (&prsrv_cast_client->addr, buf, sizeof(buf)); epicsPrintf ("CAS: partial (damaged?) UDP msg of %d bytes from %s ?\n", prsrv_cast_client->recv.cnt-prsrv_cast_client->recv.stk, buf); + + epicsTimeToStrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", + &prsrv_cast_client->time_at_last_recv); + epicsPrintf ("CAS: message received at %s\n", buf); } } else { char buf[40]; - + ipAddrToDottedIP (&prsrv_cast_client->addr, buf, sizeof(buf)); epicsPrintf ("CAS: invalid (damaged?) UDP request from %s ?\n", buf); + + epicsTimeToStrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", + &prsrv_cast_client->time_at_last_recv); + epicsPrintf ("CAS: message received at %s\n", buf); } if (CASDEBUG>2) {